Skip to content

Commit

Permalink
SRVKP-6442 - Enhance default credentials setup of the cache stepaction
Browse files Browse the repository at this point in the history
SRVKP-6442 - Fix Default value of docker-config
  • Loading branch information
pramodbindal authored and vdemeester committed Sep 19, 2024
1 parent c2fa97e commit d3e54c3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
11 changes: 8 additions & 3 deletions examples/pipeline-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
default: "false"
workspaces:
- name: source
- name: docker
tasks:
- displayName: Build go application
name: build-task
Expand Down Expand Up @@ -75,9 +76,11 @@ spec:
value: $(workspaces.source.path)/cache
- name: workingdir
value: $(workspaces.source.path)/repo
- image: $(params.image)
- name: docker-config
value: $(workspaces.docker.path)
- name: run-go-build
workingDir: $(workspaces.source.path)/repo
name: run-go-build
image: $(params.image)
env:
- name: GOCACHE
value: $(workspaces.source.path)/cache/gocache
Expand All @@ -103,5 +106,7 @@ spec:
value: $(workspaces.source.path)/cache
- name: workingdir
value: $(workspaces.source.path)/repo
- name: docker-config
value: $(workspaces.docker.path)
- name: force-cache-upload
value: $(params.force-cache-upload)
value: $(params.force-cache-upload)
3 changes: 3 additions & 0 deletions examples/pipelinerun-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ spec:
- name: image
value: golang:1.21
workspaces:
- name: docker
secret:
secretName: regcred
- name: source
emptyDir: {}
8 changes: 8 additions & 0 deletions tekton/cache-fetch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ spec:
The path where to find the google credentials. If left empty, it is ignored.
type: string
default: ""
- name: docker-config
description: |
The path where to find the docker config.json file. If left empty, it is ignored.
type: string
default: "/workspace/docker"
results: # Any result to "publish" ?
- name: fetched
description: |
Expand All @@ -53,6 +58,9 @@ spec:
value: $(params.insecure)
- name: GOOGLE_APPLICATION_CREDENTIALS
value: $(params.googleCredentialsPath)
- name: DOCKER_CONFIG
value: $(params.docker-config)

# FIXME: use a released version once something is released :)
image: ghcr.io/openshift-pipelines/tekton-caches/cache:latest
args: ["$(params.patterns[*])"]
Expand Down
7 changes: 7 additions & 0 deletions tekton/cache-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ spec:
The path where to find the google credentials. If left empty, it is ignored.
type: string
default: ""
- name: docker-config
description: |
The path where to find the docker config.json file. If left empty, it is ignored.
type: string
default: "/workspace/docker"
env:
- name: PARAM_TARGET
value: $(params.target)
Expand All @@ -63,6 +68,8 @@ spec:
value: $(params.force-cache-upload)
- name: GOOGLE_APPLICATION_CREDENTIALS
value: $(params.googleCredentialsPath)
- name: DOCKER_CONFIG
value: $(params.docker-config)
# FIXME: use a released version once something is released :)
image: ghcr.io/openshift-pipelines/tekton-caches/cache:latest
args: ["$(params.patterns[*])"]
Expand Down

0 comments on commit d3e54c3

Please sign in to comment.