File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed
ansible/roles/operator-pipeline/templates/openshift Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,12 @@ spec:
317317 params :
318318 - name : src_image
319319 value : *srcBundleImage
320- - name : dest_image
321- value : &destBundleImage "$(params.dest_registry)/$(params.dest_image_namespace)/$(tasks.certification-project-check.results.certification_project_id):$(tasks.bundle-path-validation.results.bundle_version)"
320+ - name : is_latest
321+ value : " $(params.is_latest)"
322+ - name : dest_image_registry_namespace_certproject
323+ value : " $(params.dest_registry)/$(params.dest_image_namespace)/$(tasks.certification-project-check.results.certification_project_id)"
324+ - name : dest_image_tag
325+ value : " $(tasks.bundle-path-validation.results.bundle_version)"
322326 workspaces :
323327 - name : src-registry-credentials
324328 workspace : registry-pull-credentials
Original file line number Diff line number Diff line change 1010 default : " registry.redhat.io/rhel8/skopeo:8.4-13"
1111 - name : src_image
1212 description : reference to the source bundle image
13- - name : dest_image
14- description : reference to the destination bundle image
13+ - name : dest_image_registry_namespace_certproject
14+ description : reference to the destination bundle image registry
15+ - name : dest_image_tag
16+ description : reference to the destination bundle image tag
17+ - name : is_latest
18+ description : If explicitly set to "true", image will be tagged as "latest"
1519 workspaces :
1620 - name : src-registry-credentials
1721 description : Docker config for the source registry
2731 --src-authfile $(workspaces.src-registry-credentials.path)/.dockerconfigjson \
2832 --dest-authfile $(workspaces.dest-registry-credentials.path)/.dockerconfigjson \
2933 docker://$(params.src_image) \
30- docker://$(params.dest_image)
34+ docker://"$(params.dest_image_registry_namespace_certproject):$(params.dest_image_tag)"
35+
36+ # optionally tag destination image as latest
37+ if [ "$(params.is_latest)" = "true" ]; then
38+ skopeo copy \
39+ --src-authfile $(workspaces.src-registry-credentials.path)/.dockerconfigjson \
40+ --dest-authfile $(workspaces.dest-registry-credentials.path)/.dockerconfigjson \
41+ docker://$(params.src_image) \
42+ docker://"$(params.dest_image_registry_namespace_certproject):latest"
43+ fi
You can’t perform that action at this time.
0 commit comments