|
12 | 12 | - name: public_repository_mirror |
13 | 13 | description: | |
14 | 14 | The public repository mirror where the index image becomes available. |
| 15 | + Used by release pipeline to reference the public mirror in signatures. |
15 | 16 | Example: registry.redhat.io/redhat/community-operator-index |
| 17 | + default: "" |
16 | 18 |
|
17 | 19 | # Signing configuration |
18 | 20 | - name: requester |
@@ -110,16 +112,22 @@ spec: |
110 | 112 | MANIFEST_DIGESTS="" |
111 | 113 | for i in $DIGEST_LIST |
112 | 114 | do |
113 | | - PENDING_INDEX_WITH_VERSION=$(echo $i | awk -F '+' '{print $1}') |
114 | | - PENDING_INDEX=$(echo $PENDING_INDEX_WITH_VERSION | awk -F ':' '{print $1}') |
115 | | - VERSION=$(echo $PENDING_INDEX_WITH_VERSION | awk -F ':' '{print $2}') |
| 115 | + INDEX_WITH_VERSION=$(echo $i | awk -F '+' '{print $1}') |
| 116 | + INDEX=$(echo $INDEX_WITH_VERSION | awk -F ':' '{print $1}') |
| 117 | + VERSION=$(echo $INDEX_WITH_VERSION | awk -F ':' '{print $2}') |
116 | 118 | DIGEST_SHA=$(echo $i | awk -F '@' '{print $2}') |
117 | 119 |
|
118 | | - REFERENCE="$(params.public_repository_mirror):${VERSION}" |
119 | | -
|
120 | | - PENDING_INDEX_WITH_DIGEST_SHA="${PENDING_INDEX}@${DIGEST_SHA}" |
121 | | -
|
122 | | - MANIFEST_LIST=$(skopeo inspect --retry-times 5 $SKOPEO_EXTRA_ARGS --raw docker://$PENDING_INDEX_WITH_DIGEST_SHA) |
| 120 | + if [[ -n "$(params.public_repository_mirror)" ]]; then |
| 121 | + # release pipeline |
| 122 | + INSPECT_TARGET="${INDEX}@${DIGEST_SHA}" # pending repository |
| 123 | + REFERENCE="$(params.public_repository_mirror):${VERSION}" |
| 124 | + else |
| 125 | + # index image bootstrap signing pipeline |
| 126 | + INSPECT_TARGET="${INDEX_WITH_VERSION}" # public repository mirror |
| 127 | + REFERENCE="${INDEX_WITH_VERSION}" |
| 128 | + fi |
| 129 | +
|
| 130 | + MANIFEST_LIST=$(skopeo inspect --retry-times 5 $SKOPEO_EXTRA_ARGS --raw docker://$INSPECT_TARGET) |
123 | 131 | MANIFEST_LIST=$(echo $MANIFEST_LIST | jq -r '.manifests[].digest') |
124 | 132 |
|
125 | 133 | # create comma separated index images that match each digest |
|
0 commit comments