mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Try to fix tags on build (push seems okay)
This commit is contained in:
@@ -3,93 +3,94 @@ name: $(Rev:r)
|
||||
pr: none
|
||||
|
||||
trigger:
|
||||
batch: 'true'
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- WebDisplay
|
||||
batch: 'true'
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- WebDisplay
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
- job: Build
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: Docker@2
|
||||
displayName: 'Build an image'
|
||||
inputs:
|
||||
command: 'build'
|
||||
containerRegistry: 'Docker Hub'
|
||||
dockerFile: 'WebDisplay/Dockerfile'
|
||||
tags: '$(Build.BuildNumber)'
|
||||
- task: Docker@2
|
||||
displayName: 'Push an image'
|
||||
inputs:
|
||||
command: 'push'
|
||||
containerRegistry: 'Docker Hub'
|
||||
repository: 'ckaczor/home-monitor-web-display'
|
||||
tags: '$(Build.BuildNumber)'
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ WebDisplay/deploy/manifest.yaml'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: 'WebDisplay/deploy/manifest.yaml'
|
||||
ArtifactName: 'Manifest'
|
||||
publishLocation: 'Container'
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ WebDisplay/deploy/manifest-internal.yaml'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: 'WebDisplay/deploy/manifest-internal.yaml'
|
||||
ArtifactName: 'Manifest-Internal'
|
||||
publishLocation: 'Container'
|
||||
- stage: Build
|
||||
jobs:
|
||||
- job: Build
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: Docker@2
|
||||
displayName: 'Build an image'
|
||||
inputs:
|
||||
command: 'build'
|
||||
containerRegistry: 'Docker Hub'
|
||||
dockerFile: 'WebDisplay/Dockerfile'
|
||||
repository: 'ckaczor/home-monitor-web-display'
|
||||
tags: '$(Build.BuildNumber)'
|
||||
- task: Docker@2
|
||||
displayName: 'Push an image'
|
||||
inputs:
|
||||
command: 'push'
|
||||
containerRegistry: 'Docker Hub'
|
||||
repository: 'ckaczor/home-monitor-web-display'
|
||||
tags: '$(Build.BuildNumber)'
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ WebDisplay/deploy/manifest.yaml'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: 'WebDisplay/deploy/manifest.yaml'
|
||||
ArtifactName: 'Manifest'
|
||||
publishLocation: 'Container'
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'sed -i s/#BUILD_BUILDNUMBER#/$BUILD_BUILDNUMBER/ WebDisplay/deploy/manifest-internal.yaml'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: 'WebDisplay/deploy/manifest-internal.yaml'
|
||||
ArtifactName: 'Manifest-Internal'
|
||||
publishLocation: 'Container'
|
||||
|
||||
- stage: Deploy
|
||||
jobs:
|
||||
- job: Deploy
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
artifactName: 'Manifest'
|
||||
buildType: 'current'
|
||||
downloadType: 'single'
|
||||
downloadPath: '$(System.ArtifactsDirectory)'
|
||||
- task: Kubernetes@1
|
||||
inputs:
|
||||
connectionType: 'Kubernetes Service Connection'
|
||||
kubernetesServiceEndpoint: 'Kubernetes'
|
||||
namespace: 'home-monitor'
|
||||
command: 'apply'
|
||||
useConfigurationFile: true
|
||||
configuration: '$(System.ArtifactsDirectory)/Manifest/manifest.yaml'
|
||||
secretType: 'dockerRegistry'
|
||||
containerRegistryType: 'Container Registry'
|
||||
- job: Deploy_Internal
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
artifactName: 'Manifest-Internal'
|
||||
buildType: 'current'
|
||||
downloadType: 'single'
|
||||
downloadPath: '$(System.ArtifactsDirectory)'
|
||||
- task: Kubernetes@1
|
||||
inputs:
|
||||
connectionType: 'Kubernetes Service Connection'
|
||||
kubernetesServiceEndpoint: 'Kubernetes'
|
||||
namespace: 'home-monitor'
|
||||
command: 'apply'
|
||||
useConfigurationFile: true
|
||||
configuration: '$(System.ArtifactsDirectory)/Manifest-Internal/manifest-internal.yaml'
|
||||
secretType: 'dockerRegistry'
|
||||
containerRegistryType: 'Container Registry'
|
||||
- stage: Deploy
|
||||
jobs:
|
||||
- job: Deploy
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
artifactName: 'Manifest'
|
||||
buildType: 'current'
|
||||
downloadType: 'single'
|
||||
downloadPath: '$(System.ArtifactsDirectory)'
|
||||
- task: Kubernetes@1
|
||||
inputs:
|
||||
connectionType: 'Kubernetes Service Connection'
|
||||
kubernetesServiceEndpoint: 'Kubernetes'
|
||||
namespace: 'home-monitor'
|
||||
command: 'apply'
|
||||
useConfigurationFile: true
|
||||
configuration: '$(System.ArtifactsDirectory)/Manifest/manifest.yaml'
|
||||
secretType: 'dockerRegistry'
|
||||
containerRegistryType: 'Container Registry'
|
||||
- job: Deploy_Internal
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
artifactName: 'Manifest-Internal'
|
||||
buildType: 'current'
|
||||
downloadType: 'single'
|
||||
downloadPath: '$(System.ArtifactsDirectory)'
|
||||
- task: Kubernetes@1
|
||||
inputs:
|
||||
connectionType: 'Kubernetes Service Connection'
|
||||
kubernetesServiceEndpoint: 'Kubernetes'
|
||||
namespace: 'home-monitor'
|
||||
command: 'apply'
|
||||
useConfigurationFile: true
|
||||
configuration: '$(System.ArtifactsDirectory)/Manifest-Internal/manifest-internal.yaml'
|
||||
secretType: 'dockerRegistry'
|
||||
containerRegistryType: 'Container Registry'
|
||||
|
||||
Reference in New Issue
Block a user