3030 # name of the release branch for downstream components
3131 RELEASE_BRANCH=network-operator-${MAJOR_MINOR_X}
3232 echo "release_branch=${RELEASE_BRANCH}" >> $GITHUB_OUTPUT
33-
33+
3434 # tag for components
3535 TAG="network-operator-${APP_VERSION}"
3636 echo "component_tag=${TAG}" >> $GITHUB_OUTPUT
8989 repos=$(yq -o=json 'to_entries | map(select(.value.sourceRepository != null) | .value.sourceRepository)' hack/release.yaml | jq -c 'unique')
9090 echo "Managed repositories: $repos"
9191 echo "managed_repos=$(echo $repos)" >> $GITHUB_OUTPUT
92-
92+
9393 # Extract image names with repository for components that have sourceRepository
9494 images=$(yq 'to_entries | map(select(.value.sourceRepository != null) | .value.image) | join(" ")' hack/release.yaml)
9595 echo "Managed images: $images"
@@ -160,14 +160,14 @@ jobs:
160160 - name : Wait for images to be available
161161 run : |
162162 echo "Waiting for images to be pullable from registry..."
163-
163+
164164 images='${{ needs.get-managed-components.outputs.managed_images }}'
165165 read -a IMAGE_ARRAY <<< "$images"
166-
166+
167167 MAX_RETRIES=120
168168 SLEEP_INTERVAL=60
169169 retry_count=0
170-
170+
171171 for image in "${IMAGE_ARRAY[@]}"; do
172172 image_url="${DOCKER_REGISTRY}/${image}:${COMPONENT_TAG}"
173173 echo "Checking availability of: ${image_url}"
@@ -182,15 +182,15 @@ jobs:
182182 retry_count=$((retry_count + 1))
183183 fi
184184 done
185-
185+
186186 if [ $retry_count -eq $MAX_RETRIES ]; then
187187 echo "Failed to find image after $MAX_RETRIES attempts: ${image_url}"
188188 exit 1
189189 fi
190190 done
191-
191+
192192 echo "All images are available"
193-
193+
194194 create-release-pr :
195195 needs : [determine-versions, wait-for-images]
196196 runs-on : ubuntu-24.04
@@ -234,26 +234,26 @@ jobs:
234234 # Update Network Operator version
235235 yq -i '.NetworkOperator.version = "${{ env.APP_VERSION }}"' hack/release.yaml
236236 yq -i '.NetworkOperator.repository = "${{ env.DOCKER_REGISTRY_NETWORK_OPERATOR }}"' hack/release.yaml
237-
237+
238238 # Update components with sourceRepository to use new registry and version
239239 for component in $(yq 'keys | .[]' hack/release.yaml); do
240240 SOURCE_REPO=$(yq ".${component}.sourceRepository" hack/release.yaml)
241-
241+
242242 # Skip components without sourceRepository
243243 if [ "$SOURCE_REPO" = "null" ]; then
244244 continue
245245 fi
246-
246+
247247 # We always need to add '-stig-fips' suffix for corresponding image version
248248 # TODO: do not DOCA Driver image for now because $SOURCE_REPO is null one Network Operator will support a new version format
249249 if [[ "$component" == *StigFips ]]; then
250250 COMPONENT_TAG="${COMPONENT_TAG}-stig-fips"
251- fi
252-
251+ fi
252+
253253 echo "Updating component: $component"
254254 echo " Setting repository to: $DOCKER_REGISTRY_MANAGED_COMPONENTS"
255255 echo " Setting version to: $COMPONENT_TAG"
256-
256+
257257 # Update repository and version for components with sourceRepository
258258 yq -i ".${component}.repository = \"$DOCKER_REGISTRY_MANAGED_COMPONENTS\"" hack/release.yaml
259259 yq -i ".${component}.version = \"$COMPONENT_TAG\"" hack/release.yaml
@@ -296,8 +296,8 @@ jobs:
296296
297297 # Special handling for Mofed component (update registry only, not version, for all releases)
298298 echo "Updating Mofed components registry for release"
299- yq -i '.Mofed.repository = "${{ env.DOCKER_REGISTRY_MANAGED_COMPONENTS }}"' hack/release.yaml
300- yq -i '.MofedStig .repository = "${{ env.DOCKER_REGISTRY_MANAGED_COMPONENTS }}"' hack/release.yaml
299+ yq -i '.Mofed.repository = "${{ env.DOCKER_REGISTRY_MANAGED_COMPONENTS }}"' hack/release.yaml
300+ yq -i '.MofedStigFips .repository = "${{ env.DOCKER_REGISTRY_MANAGED_COMPONENTS }}"' hack/release.yaml
301301
302302 # Update chart versions
303303 yq -i '.version = "${{ env.CHART_VERSION }}"' deployment/network-operator/Chart.yaml
0 commit comments