How to fix the multi checkout pipeline?

Ester, Sammy 20 Reputation points
2025-06-25T13:33:23.0933333+00:00

Hi Everyone,

I am working on a DevOps idea to get my pipeline to checkout multiple repositories at one time. I am getting no luck on the 2nd repository to check out, however, strangely enough the first repo is checking out. I am getting this error: Error running the 'database finalize' CodeQL command (32).

Also, is there any idea's where we don't have to hard code the repositories that we want to be scanned on? Screenshot 2025-06-25 091355

The first test is failing, but the second test passed:

Screenshot 2025-06-25 091327

Here is my yaml file:

trigger:
- none

pool:
  vmImage: ubuntu-latest

parameters:

  - name: repositories

    type: object

    default:

      - name: '########'

        branch: '######'

        notebook_path: '/eft_tripwire_uc.py'

      - name: '#######'

        branch: '#########'

        notebook_path: '/finance_reference_extract.py'

jobs:
#Loop over Repositories with Matrix-Style Jobs 

- ${{ each repo in parameters.repositories }}:
  
  - job: Scan_${{ repo.name }}

    displayName: Scan ${{ repo.name }}

    pool:

      vmImage: 'ubuntu-latest'

    steps:

      - checkout: git://${{ repo.name }}

        persistCredentials: true

        clean: true

# Use Python 3
      - task: UsePythonVersion@0
        inputs:
          versionSpec: '3.x'

#Initialize the CodeQL Scan
      - task: AdvancedSecurity-Codeql-Init@1        
        inputs:
          languages: 'python'
          sourceRoot: '.'
        displayName: 'Initialize CodeQL'

# Run the CodeQL Static analysis
      - task: AdvancedSecurity-Codeql-Analyze@1
        displayName: 'Run CodeQL Scan'

#Publish results to security tab
      - task: AdvancedSecurity-Publish@1
        displayName: 'Publish CodeQL Results'
Azure DevOps
{count} votes

1 answer

Sort by: Most helpful
  1. Divyesh Govaerdhanan 6,235 Reputation points
    2025-06-25T14:02:20.3966667+00:00

    Hello,

    Welcome to Microsoft Q&A,

    Instead of using the checkout, you could you resources to checkout multiple branches,

    resources:
      repositories:
        - repository: repo1
          type: git
          name: org-name/contract_eft_tripwire
        - repository: repo2
          type: git
          name: org-name/finance_reference_data
    
    

    https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops

    Please Upvote and accept the answer if it helps!!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.