forked from strimzi/strimzi-kafka-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-pipeline.yaml
More file actions
82 lines (80 loc) · 3.25 KB
/
release-pipeline.yaml
File metadata and controls
82 lines (80 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Triggers
trigger: none
pr: none
# Parameters
parameters:
- name: releaseVersion
displayName: Release Version
type: string
- name: useSuffix
displayName: Build suffixed images
type: boolean
default: true
- name: releaseSuffix
displayName: Release Suffix
type: number
- name: sourcePipelineId
displayName: Pipeline ID of the source build
type: number
# 16 is the pipeline ID of the Operators build pipeline which provides the artifacts in Azure
default: 16
values:
- 16
- name: sourceBuildId
displayName: Build ID of the source build
type: number
# Stages
stages:
- stage: prepare_release_artifacts
displayName: Prepare release artifacts for ${{ parameters.releaseVersion }}
condition: startsWith(variables['build.sourceBranch'], 'refs/heads/release-')
jobs:
- template: 'templates/jobs/build/release_artifacts.yaml'
parameters:
releaseVersion: '${{ parameters.releaseVersion }}'
- stage: containers_publish_with_suffix
displayName: Publish Containers for ${{ parameters.releaseVersion }}-${{ parameters.releaseSuffix }}
dependsOn:
- prepare_release_artifacts
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/heads/release-'), eq('${{ parameters.useSuffix }}', 'true'))
jobs:
- template: 'templates/jobs/build/push_containers.yaml'
parameters:
dockerTag: '${{ parameters.releaseVersion }}-${{ parameters.releaseSuffix }}'
artifactSource: 'specific'
artifactProject: 'strimzi'
artifactPipeline: '${{ parameters.sourcePipelineId }}'
artifactRunVersion: 'specific'
artifactRunId: '${{ parameters.sourceBuildId }}'
architectures: ['amd64', 'arm64', 's390x', 'ppc64le']
- stage: containers_publish
displayName: Publish Containers for ${{ parameters.releaseVersion }}
dependsOn:
- prepare_release_artifacts
- containers_publish_with_suffix
condition: and(in(dependencies.containers_publish_with_suffix.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), startsWith(variables['build.sourceBranch'], 'refs/heads/release-'))
jobs:
- template: 'templates/jobs/build/push_containers.yaml'
parameters:
dockerTag: '${{ parameters.releaseVersion }}'
artifactSource: 'specific'
artifactProject: 'strimzi'
artifactPipeline: '${{ parameters.sourcePipelineId }}'
artifactRunVersion: 'specific'
artifactRunId: '${{ parameters.sourceBuildId }}'
architectures: ['amd64', 'arm64', 's390x', 'ppc64le']
# Publishes the Strimzi Helm Chart as an OCI artifact to Quay.io
- stage: helm_as_oci_publish
displayName: Publish Helm Chart as OCI artifact
dependsOn:
- containers_publish
condition: and(in(dependencies.containers_publish.result, 'Succeeded', 'SucceededWithIssues'), startsWith(variables['build.sourceBranch'], 'refs/heads/release-'))
jobs:
- template: 'templates/jobs/build/publish_helm_chart_as_oci.yaml'
parameters:
releaseVersion: '${{ parameters.releaseVersion }}'
artifactSource: 'current'
artifactProject: 'strimzi'
artifactPipeline: ''
artifactRunVersion: ''
artifactRunId: ''