Skip to content

Commit 2d638d5

Browse files
committed
fix: user index_image_resolved as source
Signed-off-by: Leandro Mendes <lmendes@redhat.com>
1 parent 5bcc094 commit 2d638d5

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

tasks/managed/publish-index-image/publish-index-image.yaml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ spec:
150150
targetIndexWithTimestamp=$(jq -r --argjson i "$i" \
151151
'.components[$i].target_index_with_timestamp' "$(params.dataDir)/$(params.internalRequestResultsFile)")
152152
153-
sourceIndex="$(jq -r --argjson i "$i" \
154-
'.components[$i].index_image' "$(params.dataDir)/$(params.internalRequestResultsFile)")"
155-
sourceResolvedIndex="$(jq -r --argjson i "$i" \
153+
sourceIndexResolved="$(jq -r --argjson i "$i" \
156154
'.components[$i].index_image_resolved' "$(params.dataDir)/$(params.internalRequestResultsFile)")"
157155
158156
targetOcpVersion=$(jq -r --argjson i "$i" \
@@ -175,18 +173,11 @@ spec:
175173
for((x=0; x<${#publishingImages[@]}; x++ )); do
176174
echo "=== Creating internal request to publish image:"
177175
echo ""
178-
179-
# if we are pushing the timestamped index (always the index #1), we should
180-
# use index_image_resolved instead, because the target_index sha can poten_
181-
# tially be changed by a concurrent fbc process.
182-
if [ "$x" -eq 1 ]; then
183-
sourceIndex="$sourceResolvedIndex"
184-
fi
185-
echo "- from: ${sourceIndex}"
176+
echo "- from: ${sourceIndexResolved}"
186177
echo "- to: ${publishingImages[$x]}"
187178
188179
internal-request --pipeline "${request}" \
189-
-p sourceIndex="${sourceIndex}" \
180+
-p sourceIndex="${sourceIndexResolved}" \
190181
-p targetIndex="${publishingImages[$x]}" \
191182
-p targetOcpVersion="${targetOcpVersion}" \
192183
-p publishingCredentials="${credentials}" \

0 commit comments

Comments
 (0)