-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve build and release system (#5991)
* Separate artifacts for container builds Signed-off-by: Jakub Scholz <www@scholzj.com> * Rework the existing pipelines and add release and CVE pieplines Signed-off-by: Jakub Scholz <www@scholzj.com> * Review comments & Add docker-images Makefile Signed-off-by: Jakub Scholz <www@scholzj.com>
- Loading branch information
Showing
120 changed files
with
1,175 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# 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: container_build | ||
displayName: Prepare Container | ||
jobs: | ||
- template: 'templates/jobs/build/build_containers.yaml' | ||
parameters: | ||
artifactSource: 'specific' | ||
artifactProject: 'strimzi' | ||
artifactPipeline: '${{ parameters.sourcePipelineId }}' | ||
artifactRunVersion: 'specific' | ||
artifactRunId: '${{ parameters.sourceBuildId }}' | ||
architectures: ['amd64', 'arm64'] | ||
- stage: containers_publish_with_suffix | ||
displayName: Publish Containers for ${{ parameters.releaseVersion }}-${{ parameters.releaseSuffix }} | ||
dependsOn: | ||
- container_build | ||
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/heads/release-')) | ||
jobs: | ||
- template: 'templates/jobs/build/push_containers.yaml' | ||
parameters: | ||
dockerTag: '${{ parameters.releaseVersion }}-${{ parameters.releaseSuffix }}' | ||
artifactSource: 'current' | ||
artifactProject: 'strimzi' | ||
artifactPipeline: '' | ||
artifactRunVersion: '' | ||
artifactRunId: '' | ||
architectures: ['amd64', 'arm64'] | ||
- stage: manual_validation | ||
displayName: Validate container before pushing container as ${{ parameters.releaseVersion }} | ||
dependsOn: | ||
- containers_publish_with_suffix | ||
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/heads/release-')) | ||
jobs: | ||
- job: waitForValidation | ||
displayName: Wait for container image validation | ||
pool: server | ||
timeoutInMinutes: 4320 # job times out in 3 days | ||
steps: | ||
- task: ManualValidation@0 | ||
timeoutInMinutes: 4310 # task times out in 3 days | ||
inputs: | ||
notifyUsers: | | ||
github@scholzj.com | ||
xstejs24@gmail.com | ||
instructions: 'Please validate the container image' | ||
onTimeout: 'reject' | ||
- stage: containers_publish | ||
displayName: Publish Containers for ${{ parameters.releaseVersion }} | ||
dependsOn: | ||
- manual_validation | ||
- containers_publish_with_suffix | ||
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/heads/release-')) | ||
jobs: | ||
- template: 'templates/jobs/build/push_containers.yaml' | ||
parameters: | ||
dockerTag: '${{ parameters.releaseVersion }}' | ||
artifactSource: 'current' | ||
artifactProject: 'strimzi' | ||
artifactPipeline: '' | ||
artifactRunVersion: '' | ||
artifactRunId: '' | ||
architectures: ['amd64', 'arm64'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# 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-')) | ||
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'] | ||
- stage: containers_publish | ||
displayName: Publish Containers for ${{ parameters.releaseVersion }} | ||
dependsOn: | ||
- containers_publish_with_suffix | ||
condition: and(succeeded(), 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'] |
Oops, something went wrong.