mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-16 10:58:32 -05:00
Update hub build
This commit is contained in:
43
Hub/Service/deploy/azure-pipelines.yml
Normal file
43
Hub/Service/deploy/azure-pipelines.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
name: $(Rev:r)
|
||||
|
||||
trigger:
|
||||
batch: 'true'
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- Hub/Service
|
||||
|
||||
pool:
|
||||
name: Hosted Ubuntu 1604
|
||||
|
||||
steps:
|
||||
- task: Docker@0
|
||||
displayName: 'Build an image'
|
||||
inputs:
|
||||
containerregistrytype: 'Container Registry'
|
||||
dockerRegistryConnection: 'Docker Hub'
|
||||
dockerFile: 'Hub/Service/Dockerfile'
|
||||
imageName: 'ckaczor/home-monitor-hub-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-hub-service:$(Build.BuildNumber)'
|
||||
includeLatestTag: true
|
||||
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ Hub/Service/deploy/manifest.yaml'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: 'Hub/Service/deploy/manifest.yaml'
|
||||
ArtifactName: 'Manifest'
|
||||
publishLocation: 'Container'
|
||||
@@ -18,7 +18,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: hub-service
|
||||
image: ckaczor/home-monitor-hub-service:latest
|
||||
image: ckaczor/home-monitor-hub-service:#BUILD_BUILDNUMBER#
|
||||
terminationMessagePath: "/dev/termination-log"
|
||||
terminationMessagePolicy: File
|
||||
imagePullPolicy: Always
|
||||
Reference in New Issue
Block a user