[英]Azure Devops Pipeline
需要一點幫助,有人可以指出我這里有什么問題。
我想要實現的是,無論我在哪個分支,管道都必須運行結帳,但是在構建階段,如果管道從 master 運行,它會執行一些模板,如果來自其他分支的不同模板,我嘗試了很多選項,但沒有運氣.
任何指針都非常感謝。
- 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)
這看起來不像有效的 yaml。
看看這個: https : //docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema
看起來您在文件頂部缺少此內容:
階段:
即你的 yaml 應該是:
stages: - stage: Checkout displayName: Micro Service checkout and Secrets jobs:
等等
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.