mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Attempt new multi-stage pipeline
This commit is contained in:
@@ -9,35 +9,52 @@ trigger:
|
|||||||
include:
|
include:
|
||||||
- Power/Service
|
- Power/Service
|
||||||
|
|
||||||
pool:
|
stages:
|
||||||
name: Hosted Ubuntu 1604
|
- stage: Build
|
||||||
|
jobs:
|
||||||
steps:
|
- job: Build
|
||||||
- task: Docker@0
|
pool:
|
||||||
displayName: 'Build an image'
|
name: Hosted Ubuntu 1604
|
||||||
inputs:
|
steps:
|
||||||
containerregistrytype: 'Container Registry'
|
- task: Docker@0
|
||||||
dockerRegistryConnection: 'Docker Hub'
|
displayName: 'Build an image'
|
||||||
dockerFile: 'Power/Service/Dockerfile'
|
inputs:
|
||||||
imageName: 'ckaczor/home-monitor-power-service:$(Build.BuildNumber)'
|
containerregistrytype: 'Container Registry'
|
||||||
includeLatestTag: true
|
dockerRegistryConnection: 'Docker Hub'
|
||||||
|
dockerFile: 'Power/Service/Dockerfile'
|
||||||
|
imageName: 'ckaczor/home-monitor-power-service:$(Build.BuildNumber)'
|
||||||
|
includeLatestTag: true
|
||||||
|
- task: Docker@0
|
||||||
|
displayName: 'Push an image'
|
||||||
|
inputs:
|
||||||
|
containerregistrytype: 'Container Registry'
|
||||||
|
dockerRegistryConnection: 'Docker Hub'
|
||||||
|
action: 'Push an image'
|
||||||
|
imageName: 'ckaczor/home-monitor-power-service:$(Build.BuildNumber)'
|
||||||
|
includeLatestTag: true
|
||||||
|
- task: Bash@3
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ Power/Service/deploy/manifest.yaml'
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: 'Power/Service/deploy/manifest.yaml'
|
||||||
|
ArtifactName: 'Manifest'
|
||||||
|
publishLocation: 'Container'
|
||||||
|
|
||||||
- task: Docker@0
|
- stage: Deploy
|
||||||
displayName: 'Push an image'
|
jobs:
|
||||||
inputs:
|
- job: Deploy
|
||||||
containerregistrytype: 'Container Registry'
|
pool:
|
||||||
dockerRegistryConnection: 'Docker Hub'
|
name: Hosted Ubuntu 1604
|
||||||
action: 'Push an image'
|
steps:
|
||||||
imageName: 'ckaczor/home-monitor-power-service:$(Build.BuildNumber)'
|
- task: Kubernetes@1
|
||||||
includeLatestTag: true
|
inputs:
|
||||||
|
connectionType: 'Kubernetes Service Connection'
|
||||||
- task: Bash@3
|
kubernetesServiceEndpoint: 'Kubernetes'
|
||||||
inputs:
|
namespace: 'home-monitor'
|
||||||
targetType: 'inline'
|
command: 'apply'
|
||||||
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ Power/Service/deploy/manifest.yaml'
|
useConfigurationFile: true
|
||||||
|
configuration: '$(System.DefaultWorkingDirectory)/Manifest/Manifest/manifest.yaml'
|
||||||
- task: PublishBuildArtifacts@1
|
secretType: 'dockerRegistry'
|
||||||
inputs:
|
containerRegistryType: 'Azure Container Registry'
|
||||||
PathtoPublish: 'Power/Service/deploy/manifest.yaml'
|
|
||||||
ArtifactName: 'Manifest'
|
|
||||||
publishLocation: 'Container'
|
|
||||||
Reference in New Issue
Block a user