[英]Azure Devops Pipeline
Need a small help , can someone point me what is the issue here .需要一点帮助,有人可以指出我这里有什么问题。
What i am trying to achieve , the pipeline has to run checkout irrespective of the branch i am in , but in the build stage if the pipeline run from master it has execute some templet if from other branch different templet , i tried many option no luck .我想要实现的是,无论我在哪个分支,管道都必须运行结帐,但是在构建阶段,如果管道从 master 运行,它会执行一些模板,如果来自其他分支的不同模板,我尝试了很多选项,但没有运气.
Any pointer much appreciated .任何指针都非常感谢。
- stage: Checkout
displayName: Micro Service checkout and Secrets
jobs:
- job:
steps:
- template: templates/repocheckout.yml@azureTemplates
- template: templates/retrieving_secrets.yml@azureTemplates
- template: templates/Ingesting_secrets.yml@azureTemplates
- stage: Build
displayName: Microservice Build
jobs:
- job: Master
condition: eq(variables['Build.SourceBranchName'], 'master')
steps:
- template: templates/mavenbuild_new.yml@azureTemplates
- template: templates/push_artifact_jfrog.yml@azureTemplates
parameters:
service_name: '$(countryCode)-$(servicename)'
release_version: $(release)
- job: Develop
dependsOn: Master
condition: eq(variables['Build.SourceBranchName'], 'develop')
steps:
- template: templates/mavenbuild.yml@azureTemplates
- template: templates/push_artifact_jfrog.yml@azureTemplates
parameters:
service_name: '$(countryCode)-$(servicename)'
release_version: $(release)
This doesn't look like valid yaml.这看起来不像有效的 yaml。
Have a look at this: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema看看这个: https : //docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema
It looks like you are missing this at the top of the file:看起来您在文件顶部缺少此内容:
stages:阶段:
ie your yaml should be:即你的 yaml 应该是:
stages: - stage: Checkout displayName: Micro Service checkout and Secrets jobs:
etc等等
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.