mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
Update skopeo task for tls-verify flag param
This will fix skopeo tasks to have param for tls-verify flag and update tests accordingly
This commit is contained in:
parent
e166d30895
commit
7e3478f283
@ -48,6 +48,8 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/
|
||||
|
||||
- **srcImageURL**: The URL of the image to be copied to the `destination` registry.
|
||||
- **destImageURL**: The URL of the image where the image from `source` should be copied to.
|
||||
- **srcTLSverify**: Verify the TLS on the src registry endpoint
|
||||
- **destTLSverify**: Verify the TLS on the dest registry endpoint
|
||||
|
||||
## Workspace
|
||||
|
||||
|
@ -29,6 +29,14 @@ spec:
|
||||
description: URL of the image where the image from source should be copied to
|
||||
type: string
|
||||
default: ""
|
||||
- name: srcTLSverify
|
||||
description: Verify the TLS on the src registry endpoint
|
||||
type: string
|
||||
default: "true"
|
||||
- name: destTLSverify
|
||||
description: Verify the TLS on the dest registry endpoint
|
||||
type: string
|
||||
default: "true"
|
||||
steps:
|
||||
- name: skopeo-copy
|
||||
image: quay.io/vinamra2807/skopeo:latest
|
||||
@ -46,7 +54,7 @@ spec:
|
||||
cmd="$cmd \
|
||||
$url"
|
||||
done
|
||||
skopeo copy $cmd
|
||||
skopeo copy $cmd --src-tls-verify=$(params.srcTLSverify) --dest-tls-verify=$(params.destTLSverify)
|
||||
echo $cmd
|
||||
done < "$filename"
|
||||
}
|
||||
@ -54,7 +62,7 @@ spec:
|
||||
# If single image is to be copied then, it can be passed through
|
||||
# params in the taskrun.
|
||||
if [ "$(params.srcImageURL)" != "" ] && [ "$(params.destImageURL)" != "" ] ; then
|
||||
skopeo copy "$(params.srcImageURL)" "$(params.destImageURL)"
|
||||
skopeo copy "$(params.srcImageURL)" "$(params.destImageURL)" --src-tls-verify=$(params.srcTLSverify) --dest-tls-verify=$(params.destTLSverify)
|
||||
else
|
||||
# If file is provided as a configmap in the workspace then multiple images can be copied.
|
||||
#
|
||||
|
@ -7,7 +7,9 @@ spec:
|
||||
- name: srcImageURL
|
||||
value: docker://quay.io/temp/kubeconfigwriter:v1
|
||||
- name: destImageURL
|
||||
value: localhost:5000/kube:latest
|
||||
value: docker://localhost:5000/kube:latest
|
||||
- name: destTLSverify
|
||||
value: "false"
|
||||
taskRef:
|
||||
name: skopeo-copy
|
||||
workspaces:
|
||||
|
Loading…
Reference in New Issue
Block a user