[英]How can i run two manifests a single pipeline YAML?
i have a pipeline close with this one:我有一个与此关闭的管道:
trigger:
- master
variables:
imageName: 'gosample'
registry: 'kubreg.azurecr.io'
stages:
- stage: build
jobs:
- job: 'BuildAndPush'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Docker@2
inputs:
containerRegistry: 'ACR'
repository: '$(imageName)'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'manifests'
targetPath: 'manifests'
- stage: deploy
jobs:
- deployment: 'DeployToK8S'
pool:
vmImage: 'ubuntu-latest'
environment: dev
strategy:
runOnce:
deploy:
steps:
- task: DownloadPipelineArtifact@1
inputs:
buildType: 'current'
artifactName: 'manifests'
targetPath: '$(System.ArtifactsDirectory)/manifests'
- task: KubernetesManifest@0
inputs:
action: 'deploy'
kubernetesServiceConnection: 'dev-kub-gosample-1558821689026'
namespace: 'gosample'
manifests: '$(System.ArtifactsDirectory)/manifests/deploy.yaml'
containers: '$(registry)/$(imageName):$(Build.BuildId)'
And i want pass two manifests inside the deploy stage, how i can do?我想在部署阶段传递两个清单,我该怎么做?
I tried to pass something like:我试图通过类似的东西:
manifests: '$(System.ArtifactsDirectory)/manifests/deploy.yaml','$(System.ArtifactsDirectory)/manifest/ingress-nginx.yaml'
But Don't work and i really dont have idea how to do this.但是不要工作,我真的不知道该怎么做。
You can list multiple files by using a multiline string, as documented .您可以使用多行字符串列出多个文件, 如 documented 所示。
task: KubernetesManifest@0
inputs:
manifests: |
manifests/deployment.yml
manifests/service.yml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.