-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: arewm <[email protected]>
- Loading branch information
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../docker-build-oci-ta | ||
|
||
patches: | ||
- path: patch.yaml | ||
target: | ||
kind: Pipeline |
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,73 @@ | ||
--- | ||
- op: replace | ||
path: /metadata/name | ||
value: docker-build-multi-arch-oci-ta | ||
# Order of Tasks from the base docker-build Pipeline: | ||
# $ kustomize build pipelines/docker-build-oci-ta | yq ".spec.tasks.[].name" | nl -v 0 | ||
# 0 init | ||
# 1 clone-repository | ||
# 2 prefetch-dependencies | ||
# 3 build-container | ||
# 4 build-image-index | ||
# 5 build-source-image | ||
# 6 deprecated-base-image-check | ||
# 7 clair-scan | ||
# 8 ecosystem-cert-preflight-checks | ||
# 9 sast-snyk-check | ||
# 10 clamav-scan | ||
# 11 sbom-json-check | ||
# 12 apply-tags | ||
# 13 push-dockerfile | ||
# change name to build-containers | ||
# add build-platforms parameter | ||
# add matrix to run based on build-platforms | ||
# change build-image-index to use results from build-containers as well as run after it | ||
# change build-image-index to build image index | ||
# change JAVA_COMMUNITY_DEPENDENCIES value to "$(tasks.build-containers.results.JAVA_COMMUNITY_DEPENDENCIES[0])" | ||
|
||
# build-container | ||
- op: replace | ||
path: /spec/tasks/3/name | ||
value: build-containers | ||
- op: replace | ||
path: /spec/tasks/3/taskRef/name | ||
value: buildah-remote-oci-ta | ||
- op: add | ||
path: /spec/tasks/3/matrix | ||
value: | ||
params: | ||
- name: PLATFORM | ||
value: ["$(params.build-platforms)"] | ||
|
||
# build-image-index | ||
- op: replace | ||
path: /spec/tasks/4/params | ||
value: | ||
- name: IMAGE | ||
value: $(params.output-image) | ||
- name: COMMIT_SHA | ||
value: $(tasks.clone-repository.results.commit) | ||
- name: BUILD_IMAGE_INDEX | ||
value: "true" | ||
- name: IMAGES | ||
value: | ||
- $(tasks.build-containers.results.IMAGE_REF[*]) | ||
- op: replace | ||
path: /spec/tasks/4/runAfter | ||
value: | ||
- build-containers | ||
|
||
# Add a pipeline definition parameter to customize the build platforms | ||
- op: add | ||
path: /spec/params/- | ||
value: | ||
name: build-platforms | ||
description: List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller. | ||
type: array | ||
default: | ||
- "local/amd64" | ||
|
||
# Just use the first container built for the JAVA_COMMUNITY_DEPENDENCIES result | ||
- op: replace | ||
path: /spec/results/4/value | ||
value: $(tasks.build-containers.results.JAVA_COMMUNITY_DEPENDENCIES[0]) |