Can't override jobs.yml parameters like disableComponentGovernance from job
See original GitHub issue- This issue is blocking
- This issue is causing unreasonable pain
Given a .yml like this:
stages:
- stage: build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
jobs:
- job: Build_Linux
timeoutInMinutes: 120
disableComponentGovernance: true # <--- this causes an error
steps:
....
results in an Azure Pipelines error:
/eng/common/templates/jobs/jobs.yml (Line: 45, Col: 3): 'disableComponentGovernance' is already defined
If I read it correctly this happens because this code passes along parameters from jobs.yml into the job.yml so we end up with one disableComponentGovernance
from jobs.yml and one from the job
: https://github.com/dotnet/arcade/blob/3cbeb243091dab28adfdcd09fc43b77112cfbe72/eng/common/templates/jobs/jobs.yml#L44-L51
The same happens with the other parameters that are forwarded, like continueOnError
etc.
/cc @mmitche
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
jenkins - How to disable automatic build from scm change ...
Click "Add property", choose "Suppress automatic SCM triggering"; Save. That would prevent changes to the master branch from triggering a build ...
Read more >Create and Configure Jobs and Pipelines Using YAML
In DevCS, you can use a YAML file (a file with .yml extension) to store a job or a pipeline configuration in any...
Read more >Jobs | GitLab
yml file, the variable is overridden with the new value. Any variables overridden by using this process are expanded and not masked. Manual...
Read more >`.gitlab-ci.yml` keyword reference
Override a set of commands that are executed before job. cache, List of files that should be cached between subsequent runs. coverage, Code ......
Read more >Configuring CI/CD Pipelines as Code with YAML in Azure ...
Navigate to your team project on Azure DevOps in a new browser tab. Before digging into the YAML pipelines, you will want to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m going to split this issue:
yes exactly. it’s not blocking right now since the task no longer causes an error but the warning is just noise.
Removing the property from jobs.yml sounds like a good solution.