Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update credentials for Ko Multi-Arch Images #2327

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions tekton/resources/images/ko-multi-arch-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ spec:
- name: secret
steps:
- env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: $(workspaces.secret.path)/release.json
- name: IMAGE_REGISTRY_CREDENTIALS
value: $(workspaces.secret.path)/credentials
- name: KO_DOCKER_REPO
value: $(params.imageBaseUrl)
- name: PLATFORMS
Expand All @@ -76,9 +76,8 @@ spec:
name: build-image-multi-arch
script: |
#!/usr/bin/env sh

gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
gcloud auth configure-docker
IMAGE_REGISTRY_USER=tekton-robot
docker login ghcr.io -u ${IMAGE_REGISTRY_USER} --password-stdin <"${IMAGE_REGISTRY_CREDENTIALS}"

cd $(workspaces.source.path)
ko publish --platform ${PLATFORMS} --base-import-paths --tags ${IMAGE_TAGS} ${CONTEXT_PATH}
Expand Down Expand Up @@ -129,7 +128,7 @@ spec:
storage: 1Gi
- name: secret
secret:
secretName: release-secret
secretName: ghcr-creds
params:
- name: contextPath
value: $(tt.params.contextPath)
Expand Down