How do I use the targetUpdateIds parameter? #1333
-
I have a C# repo containing multiple projects I want to update. That means the dependabot configs for each project will be stored in the same dependabot.yaml, in the root of the repo. Example: .github/dependabot.yaml - package-ecosystem: "nuget"
directory: "/src/project1"
- package-ecosystem: "npm"
directory: "/src/project1/client"
- package-ecosystem: "nuget"
directory: "/src/project2" Currently in my Azure pipeline, the dependabot task will update these projects serially, one at a time. But I would like to update them in parallel (especially because the pipeline will timeout after 60 min). After reading the description of the "targetUpdateIds" parameter, it seems to achieve what I want, but I wanted to confirm. Can I simply do the following in my pipeline? stages:
- stage: 'Project1 Nuget'
dependsOn: []
jobs:
- job:
steps:
- task: dependabot@1
displayName: Update dependencies - Project 1 Nuget
inputs:
mergeStrategy: 4
setAutoComplete: true
useUpdateScriptvNext: true
targetRepositoryName: 'Project1'
targetUpdateIds: '0'
- stage: 'Project1 Npm'
dependsOn: []
jobs:
- job:
steps:
- task: dependabot@1
displayName: Update dependencies - Project 1 Npm
inputs:
mergeStrategy: 4
setAutoComplete: true
useUpdateScriptvNext: true
targetRepositoryName: 'Project1'
targetUpdateIds: '1'
- stage: 'Project2 Nuget'
dependsOn: []
jobs:
- job:
steps:
- task: dependabot@1
displayName: Update dependencies - Project 2 Nuget
inputs:
mergeStrategy: 4
setAutoComplete: true
useUpdateScriptvNext: true
targetRepositoryName: 'Project1'
targetUpdateIds: '2' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Indeed, However, I don't think this will sort your issue to do with the duration of the update. If extending the pipeline duration beyond 60 min is not possible, the only other alternative is to run the server component which works by creating ContainerApp Jobs and will run in parallel. |
Beta Was this translation helpful? Give feedback.
Indeed,
targetUpdateIds
was intended to select which updates to run. It is a list of zero-based indexes of the updates to run, as per your dependabot.yml file, separated by a semi-colon. For example to run the npm update only, set thetargetUpdateIds: 1
However, I don't think this will sort your issue to do with the duration of the update. If extending the pipeline duration beyond 60 min is not possible, the only other alternative is to run the server component which works by creating ContainerApp Jobs and will run in parallel.