Only publish manifests when image pushed
This commit is contained in:
Родитель
06626ddd4d
Коммит
c75f934cec
|
@ -24,11 +24,30 @@ stages:
|
|||
displayName: Gradle Build
|
||||
inputs:
|
||||
jdkVersionOption: 1.11
|
||||
- job: kubernetes
|
||||
displayName: Kubernetes
|
||||
- stage: Deploy
|
||||
displayName: Deploy
|
||||
dependsOn: assemble
|
||||
condition:
|
||||
not(eq(variables['build.reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- job: deploy
|
||||
displayName: Deploy Docker Image
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- task: CmdLine@2
|
||||
displayName: 'Set Version'
|
||||
inputs:
|
||||
script: ./setversion.sh $(Build.BuildNumber)
|
||||
- task: Docker@2
|
||||
displayName: Build and Push Docker Image
|
||||
inputs:
|
||||
command: buildAndPush
|
||||
containerRegistry: SteeltoeContainerRegistry
|
||||
repository: initializr-config-server
|
||||
tags: |
|
||||
$(Build.BuildId)
|
||||
latest
|
||||
- task: ShellScript@2
|
||||
displayName: Generate Staging Manifest
|
||||
inputs:
|
||||
|
@ -52,27 +71,3 @@ stages:
|
|||
inputs:
|
||||
targetPath: manifests
|
||||
artifactName: manifests
|
||||
- stage: Deploy
|
||||
displayName: Deploy
|
||||
dependsOn: assemble
|
||||
condition:
|
||||
not(eq(variables['build.reason'], 'PullRequest'))
|
||||
jobs:
|
||||
- job: push
|
||||
displayName: Push
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- task: CmdLine@2
|
||||
displayName: 'Set Version'
|
||||
inputs:
|
||||
script: ./setversion.sh $(Build.BuildNumber)
|
||||
- task: Docker@2
|
||||
displayName: Build and Push
|
||||
inputs:
|
||||
command: buildAndPush
|
||||
containerRegistry: SteeltoeContainerRegistry
|
||||
repository: initializr-config-server
|
||||
tags: |
|
||||
$(Build.BuildId)
|
||||
latest
|
||||
|
|
Загрузка…
Ссылка в новой задаче