Skip to content

Commit ab62806

Browse files
committed
Only publish manifests when image pushed
1 parent 39c970c commit ab62806

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

azure-pipelines.yaml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,26 @@ stages:
3535
inputs:
3636
command: test
3737
arguments: --no-build
38-
- job: kubernetes
39-
displayName: Kubernetes
38+
- stage: Deploy
39+
displayName: Deploy
40+
dependsOn: assemble
41+
condition:
42+
not(eq(variables['build.reason'], 'PullRequest'))
43+
jobs:
44+
- job: deploy
45+
displayName: Deploy Docker Image
4046
pool:
4147
vmImage: ubuntu-latest
4248
steps:
49+
- task: Docker@2
50+
displayName: Build and Push Docker Image
51+
inputs:
52+
command: buildAndPush
53+
containerRegistry: SteeltoeContainerRegistry
54+
repository: net-core-tool-service
55+
tags: |
56+
$(Build.BuildId)
57+
latest
4358
- task: ShellScript@2
4459
displayName: Generate Staging Manifest
4560
inputs:
@@ -64,23 +79,3 @@ stages:
6479
inputs:
6580
targetPath: manifests
6681
artifactName: manifests
67-
- stage: Deploy
68-
displayName: Deploy
69-
dependsOn: assemble
70-
condition:
71-
not(eq(variables['build.reason'], 'PullRequest'))
72-
jobs:
73-
- job: push
74-
displayName: Push
75-
pool:
76-
vmImage: ubuntu-latest
77-
steps:
78-
- task: Docker@2
79-
displayName: Build and Push
80-
inputs:
81-
command: buildAndPush
82-
containerRegistry: SteeltoeContainerRegistry
83-
repository: net-core-tool-service
84-
tags: |
85-
$(Build.BuildId)
86-
latest

0 commit comments

Comments
 (0)