VSTS has created a yaml pipeline automatically for me. It fails at step PublishPipelineArtifact.
I'm not familiar with the yaml syntax.
Below is an extract of the auto generated yaml. 2 steps talk about manifests.
However my visual studio project doesn't have any manifest file or directory and VSTS didn't generate any Deployment.yml or service.yml.
I have no idea why it's failing and why such yaml was generated with such dependancies that do not exist.
(if I create the pipeline with the graphical standard way (not asking for yaml pipelines), it does not fail and no manifest deployment step is generated).
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build
pool:
name: "AWS Linux agents pool"
steps:
- checkout: Self
- checkout: Shared
path: s/File.Pod/Shared.Lib
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)
- upload: manifests
artifact: manifests
- stage: Deploy
displayName: Deploy stage
dependsOn: Build
jobs:
- deployment: Deploy
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
displayName: Deploy
pool:
name: "AWS Linux agents pool"
environment: 'FilePod-1617.development'
strategy:
runOnce:
deploy:
steps:
- task: KubernetesManifest@0
displayName: Create imagePullSecret
inputs:
action: createSecret
secretName: $(imagePullSecret)
dockerRegistryEndpoint: $(dockerRegistryServiceConnection)
- task: KubernetesManifest@0
displayName: Deploy to Kubernetes cluster
inputs:
action: deploy
manifests: |
$(Pipeline.Workspace)/manifests/deployment.yml
$(Pipeline.Workspace)/manifests/service.yml
imagePullSecrets: |
$(imagePullSecret)
containers: |
$(containerRegistry)/$(imageRepository):$(tag)
From what I see, the manifest folder exists in the repository.
Do I need somewhere in DockerFile to ask to copy it somewhere