Reputation:
Azure Devops pipelines provide a clone functionality. This is super useful functionality for scaffolding pipelines. My yaml pipelines have a lot of variables, and it's difficult and error prone to reassign all of these variables from scratch.
The Azure Devops UI updated in the last week or so, and there doesn't seem to be an option to clone yaml pipelines anymore. Classic pipelines still have the clone option.
Can anyone figure out how to clone a yaml pipeline with the new UI?
Upvotes: 1
Views: 1997
Reputation: 195
I've never used a cloning option in YAML. But I wouldn't use so many Azure DevOps variables which were created in the UI. You have multiple options here:
The variable group can be linked to multiple pipelines. But there is currently no scope available. So, if you have multiple environments, you have to name it like "myvariablegroup-dev", "myvariablegroup-prod". Hopefully, this feature to attach a variable group to an environment is coming in the near feature.
Upvotes: -1
Reputation: 30313
1,You can disable the multi-stage pipelines feature in preview features
On the top right corner of the page click the user profile and choose Preview features
Then disable the Multi-stage pipelines. Then you will see the clone option appear again.
2,The other workaround is to create a new pipeline and choose to use the Existing Azure PipelineS Yaml file while following the wizard. (which has the same effect with cloning yaml, they use the same azure-pipelines.yml file)
Then choose the same yaml file with the original pipeline.
Upvotes: -1
Reputation: 1235
Hmm I haven't used the clone feature, but have you investigated using variable groups or variable templates to make your life easier? You can link a variable group to Azure Key Vault to facilitate secrets.
Upvotes: 0