Created
March 21, 2020 09:28
-
-
Save michalpenka/50b588ebb74a01afea805e0f385a9928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
- master | |
resources: | |
- repo: self | |
variables: | |
tagBuild: '$(Build.BuildId)' | |
stages: | |
- stage: Build | |
displayName: Build image | |
jobs: | |
- job: Build | |
displayName: Build | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: Docker@2 | |
displayName: Build and push the image | |
inputs: | |
containerRegistry: 'Docker Hub' | |
repository: 'YOUR_DOCKERHUBID/YOUR_DOCKERHUBREPONAME' | |
command: buildAndPush | |
dockerfile: '$(Build.SourcesDirectory)/Dockerfile' | |
tags: | | |
$(tagBuild) | |
- task: PublishPipelineArtifact@1 | |
displayName: Publish KubernetesDeploymentManifest | |
inputs: | |
targetPath: '$(Build.SourcesDirectory)/kubernetes-deployment.yml' | |
artifact: 'KubernetesDeploymentManifest' | |
publishLocation: 'pipeline' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment