Skip to content

Commit

Permalink
add insecure to the task as well
Browse files Browse the repository at this point in the history
  • Loading branch information
chmouel committed Apr 24, 2024
1 parent 2a6d49f commit 1c3b226
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tekton/cache-fetch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ spec:
description: |
The working dir from where the files patterns needs to be taken
type: string
- name: insecure
description: |
Whether to use insecure mode for fetching the cache
type: boolean
default: false
results: # Any result to "publish" ?
- name: fetched
description: |
Expand All @@ -39,6 +44,8 @@ spec:
value: $(params.cachePath)
- name: PARAM_WORKINGDIR
value: $(params.workingdir)
- name: PARAM_INSECURE
value: $(params.insecure)
# FIXME: use a released version once something is released :)
image: ghcr.io/openshift-pipelines/tekton-caches/cache:latest
args: ["$(params.patterns[*])"]
Expand All @@ -55,6 +62,7 @@ spec:
/ko-app/cache fetch ${PATTERN_FLAGS} \
--source ${PARAM_SOURCE} \
--folder ${PARAM_CACHE_PATH} \
--insecure ${PARAM_INSECURE} \
--workingdir ${PARAM_WORKINGDIR}
if [ $? -eq 0 ]; then
echo -n true > $(step.results.fetched.path)
Expand Down
8 changes: 8 additions & 0 deletions tekton/cache-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ spec:
description: |
The working dir from where the files patterns needs to be taken
type: string
- name: insecure
description: |
Whether to use insecure mode for fetching the cache
type: boolean
default: false
results: # Any result to "publish" ?
- name: fetched
description: |
Expand All @@ -39,6 +44,8 @@ spec:
value: $(params.cachePath)
- name: PARAM_WORKINGDIR
value: $(params.workingdir)
- name: PARAM_INSECURE
value: $(params.insecure)
# FIXME: use a released version once something is released :)
image: ghcr.io/openshift-pipelines/tekton-caches/cache:latest
args: ["$(params.patterns[*])"]
Expand All @@ -55,4 +62,5 @@ spec:
/ko-app/cache upload ${PATTERN_FLAGS} \
--target ${PARAM_TARGET} \
--folder ${PARAM_CACHE_PATH} \
--insecure ${PARAM_INSECURE} \
--workingdir ${PARAM_WORKINGDIR}

0 comments on commit 1c3b226

Please sign in to comment.