|
90 | 90 | echo "Managed repositories: $repos" |
91 | 91 | echo "managed_repos=$(echo $repos)" >> $GITHUB_OUTPUT |
92 | 92 |
|
93 | | - # Extract image names with repository for components that have sourceRepository |
| 93 | + # Extract image names with repository for components that have sourceRepository |
94 | 94 | images=$(yq 'to_entries | map(select(.value.sourceRepository != null) | .value.image) | join(" ")' hack/release.yaml) |
95 | 95 | echo "Managed images: $images" |
96 | 96 | echo "managed_images=$images" >> $GITHUB_OUTPUT |
@@ -169,11 +169,17 @@ jobs: |
169 | 169 | retry_count=0 |
170 | 170 |
|
171 | 171 | for image in "${IMAGE_ARRAY[@]}"; do |
172 | | - image_url="${DOCKER_REGISTRY}/${image}:${COMPONENT_TAG}" |
| 172 | + if [[ "$image" == *stig-fips ]]; then |
| 173 | + component_tag="${COMPONENT_TAG}-stig-fips" |
| 174 | + else |
| 175 | + component_tag="${COMPONENT_TAG}" |
| 176 | + fi |
| 177 | +
|
| 178 | + image_url="${DOCKER_REGISTRY}/${image}:${component_tag}" |
173 | 179 | echo "Checking availability of: ${image_url}" |
174 | 180 |
|
175 | 181 | while [ $retry_count -lt $MAX_RETRIES ]; do |
176 | | - if docker manifest inspect "${DOCKER_REGISTRY}/${image}:${COMPONENT_TAG}" > /dev/null 2>&1; then |
| 182 | + if docker manifest inspect "${DOCKER_REGISTRY}/${image}:${component_tag}" > /dev/null 2>&1; then |
177 | 183 | echo "Image available: ${image_url}" |
178 | 184 | break |
179 | 185 | else |
@@ -247,16 +253,18 @@ jobs: |
247 | 253 | # We always need to add '-stig-fips' suffix for corresponding image version |
248 | 254 | # TODO: do not DOCA Driver image for now because $SOURCE_REPO is null one Network Operator will support a new version format |
249 | 255 | if [[ "$component" == *StigFips ]]; then |
250 | | - COMPONENT_TAG="${COMPONENT_TAG}-stig-fips" |
| 256 | + component_tag="${COMPONENT_TAG}-stig-fips" |
| 257 | + else |
| 258 | + component_tag="${COMPONENT_TAG}" |
251 | 259 | fi |
252 | 260 |
|
253 | 261 | echo "Updating component: $component" |
254 | 262 | echo " Setting repository to: $DOCKER_REGISTRY_MANAGED_COMPONENTS" |
255 | | - echo " Setting version to: $COMPONENT_TAG" |
| 263 | + echo " Setting version to: $component_tag" |
256 | 264 |
|
257 | 265 | # Update repository and version for components with sourceRepository |
258 | 266 | yq -i ".${component}.repository = \"$DOCKER_REGISTRY_MANAGED_COMPONENTS\"" hack/release.yaml |
259 | | - yq -i ".${component}.version = \"$COMPONENT_TAG\"" hack/release.yaml |
| 267 | + yq -i ".${component}.version = \"$component_tag\"" hack/release.yaml |
260 | 268 |
|
261 | 269 | # Pull the component's helm chart |
262 | 270 | CHART_LOCATION=$(yq ".${component}.chartLocation" hack/release.yaml) |
|
0 commit comments