Skip to content

Commit

Permalink
feat(apps/staging/tekton): try to implement mutli arch image building (
Browse files Browse the repository at this point in the history
…#510)

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo authored May 2, 2023
1 parent 07c2cfa commit 2a139e3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
29 changes: 25 additions & 4 deletions apps/staging/tekton/configs/pipelines/kaniko-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,28 @@ spec:
- name: BUILDER_IMAGE
value: "$(params.BUILDER_IMAGE)"
- name: EXTRA_ARGS
value: ["$(params.EXTRA_ARGS[*])"]
value: ["$(params.EXTRA_ARGS[*])", --build-arg, ARCH=amd64]
workspaces:
- name: source
workspace: git-source
- name: dockerconfig
workspace: dockerconfig
- name: build-arm64
runAfter:
- fetch-from-git
taskRef:
name: kaniko
params:
- name: IMAGE
value: "$(params.IMAGE)"
- name: DOCKERFILE
value: "$(params.DOCKERFILE)"
- name: CONTEXT
value: "$(params.CONTEXT)"
- name: BUILDER_IMAGE
value: "$(params.BUILDER_IMAGE)"
- name: EXTRA_ARGS
value: ["$(params.EXTRA_ARGS[*])", --build-arg, ARCH=arm64]
workspaces:
- name: source
workspace: git-source
Expand All @@ -61,7 +82,7 @@ spec:
- name: mult-arch-push
runAfter:
- "build-amd64"
# - "build-arm64"
- "build-arm64"
taskRef:
name: multi-arch-image-push
params:
Expand All @@ -71,8 +92,8 @@ spec:
value: "$(params.TAGS)"
- name: platform-and-digest-list
value:
- "linux/amd64 => $(tasks.build-amd64.results.IMAGE_DIGEST)"
# - "linux/arm64 => $(tasks.build-arm64.results.IMAGE_DIGEST)"
- linux/amd64 => $(tasks.build-amd64.results.IMAGE_DIGEST)
- linux/arm64 => $(tasks.build-arm64.results.IMAGE_DIGEST)
workspaces:
- name: dockerconfig
workspace: dockerconfig
Expand Down
4 changes: 2 additions & 2 deletions apps/staging/tekton/setup/operator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
nodeSelector: {}
tolerations: []
pipeline:
disable-affinity-assistant: false
disable-affinity-assistant: true
disable-creds-init: false
# disable-home-env-overwrite: true
# disable-working-directory-overwrite: true
Expand Down Expand Up @@ -38,7 +38,7 @@ spec:
resources:
- taskrun
- pipelinerun
keep: 10
keep: 100
schedule: "0 * * * *" # hourly
hub:
params:
Expand Down

0 comments on commit 2a139e3

Please sign in to comment.