Skip to content

Instantly share code, notes, and snippets.

@screamingworld
Created March 1, 2021 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save screamingworld/ae1bbb0c11e4dc6eb32a3eecb57639bf to your computer and use it in GitHub Desktop.
Save screamingworld/ae1bbb0c11e4dc6eb32a3eecb57639bf to your computer and use it in GitHub Desktop.
Notifier - web api pipeline 3
steps:
- checkout: self
- checkout: Common
- task: Docker@1
displayName: Build Image ACC
inputs:
containerregistrytype: $(ContainerRegistryType)
azureSubscriptionEndpoint: $(ServiceConnectionEndpoint)
azureContainerRegistry: 'notifiercontainerregistryacc.azurecr.io'
command: 'Build an image'
dockerFile: './WebApi/.deploy/Dockerfile'
imageName: '$(SourceImageName)'
useDefaultContext: false
buildContext: './'
- task: Docker@1
displayName: Push Image to ACC Registry
inputs:
containerregistrytype: $(ContainerRegistryType)
azureSubscriptionEndpoint: $(ServiceConnectionEndpoint)
azureContainerRegistry: 'notifiercontainerregistryacc.azurecr.io'
command: 'Push an image'
imageName: '$(SourceImageName)'
- task: Docker@1
displayName: Build Image PRD
inputs:
containerregistrytype: $(ContainerRegistryType)
azureSubscriptionEndpoint: $(ServiceConnectionEndpoint)
azureContainerRegistry: 'notifiercontainerregistryprd.azurecr.io'
command: 'Build an image'
dockerFile: './WebApi/.deploy/Dockerfile'
imageName: '$(SourceImageName)'
useDefaultContext: false
buildContext: './'
- task: Docker@1
displayName: Push Image to PRD Registry
inputs:
containerregistrytype: $(ContainerRegistryType)
azureSubscriptionEndpoint: $(ServiceConnectionEndpoint)
azureContainerRegistry: 'notifiercontainerregistryprd.azurecr.io'
command: 'Push an image'
imageName: '$(SourceImageName)'
- task: CopyFiles@2
displayName: Copy deployment files
inputs:
SourceFolder: './WebApi/.deploy/k8s'
Contents: '**'
TargetFolder: '$(build.ArtifactStagingDirectory)/kubernetes'
CleanTargetFolder: true
OverWrite: true
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment