Skip to content

Commit 5c34be0

Browse files
authored
Fix up nightly release-automation (#10)
* Login to the infrawatch quay registry Created organization secrets in GitHub with the infrawatch+release_automation robot account so that the release automation script (for nightly builds) can now push to the infrawatch registry. Previously the release automation script only needed to access the infrawatch-operators registry to push the bundles and index image, but with the recent changes to tag and push the latest into the nightly builds, access to the infrawatch repo is also necessary. Related: STF-1559 * Add access to new secrets Add access to the new secrets to the releaser.sh script in GitHub Actions. * Move container registry logins around It looks like docker login might be getting overridden so move the logins around so that login to infrawatch repo happens, followed by appropriate actions, and then login to infrawatch-operators prior to the bundle and index image operations.
1 parent ad2fc83 commit 5c34be0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/nightly.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
GITHUB_WORKSPACE: ${{ github.workspace }}
5959
QUAY_INFRAWATCH_OPERATORS_USERNAME: ${{ secrets.QUAY_INFRAWATCH_OPERATORS_USERNAME }}
6060
QUAY_INFRAWATCH_OPERATORS_PASSWORD: ${{ secrets.QUAY_INFRAWATCH_OPERATORS_PASSWORD }}
61+
QUAY_INFRAWATCH_USERNAME: ${{ secrets.QUAY_INFRAWATCH_USERNAME }}
62+
QUAY_INFRAWATCH_PASSWORD: ${{ secrets.QUAY_INFRAWATCH_PASSWORD }}
6163

6264
periodic_release_1_5:
6365
name: Periodic Release for STF 1.5
@@ -114,6 +116,8 @@ jobs:
114116
GITHUB_WORKSPACE: ${{ github.workspace }}
115117
QUAY_INFRAWATCH_OPERATORS_USERNAME: ${{ secrets.QUAY_INFRAWATCH_OPERATORS_USERNAME }}
116118
QUAY_INFRAWATCH_OPERATORS_PASSWORD: ${{ secrets.QUAY_INFRAWATCH_OPERATORS_PASSWORD }}
119+
QUAY_INFRAWATCH_USERNAME: ${{ secrets.QUAY_INFRAWATCH_USERNAME }}
120+
QUAY_INFRAWATCH_PASSWORD: ${{ secrets.QUAY_INFRAWATCH_PASSWORD }}
117121
BUNDLE_TAG: "stable-1.5"
118122
INSPECTION_TAG: "stable-1.5"
119123
INDEX_IMAGE_TAG: "nightly-1.5"

releaser.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ ARTIFACT_IMAGES=${ARTIFACT_IMAGES:-"sg-core sg-bridge prometheus-webhook-snmp se
1818
echo "SGO result dir: ${SGO_BUNDLE_RESULT_DIR}"
1919
echo "STO result dir: ${STO_BUNDLE_RESULT_DIR}"
2020

21-
# login to quay.io registry so we can push bundles to infrawatch-operators organization
22-
echo "${QUAY_INFRAWATCH_OPERATORS_PASSWORD}" | docker login -u="${QUAY_INFRAWATCH_OPERATORS_USERNAME}" --password-stdin quay.io || exit
21+
# login to quay.io registry so we can push bundles to infrawatch organization
22+
echo "${QUAY_INFRAWATCH_PASSWORD}" | docker login -u="${QUAY_INFRAWATCH_USERNAME}" --password-stdin quay.io || exit
2323

2424
# tag existing artifacts for nightly reference
2525
for IMAGE in ${ARTIFACT_IMAGES}; do
2626
skopeo copy "docker://quay.io/infrawatch/${IMAGE}:${IMAGE_TAG}" "docker://quay.io/infrawatch/${IMAGE}:${INSPECTION_TAG}"
2727
done
2828

29+
# login to quay.io registry so we can push bundles to infrawatch-operators organization
30+
echo "${QUAY_INFRAWATCH_OPERATORS_PASSWORD}" | docker login -u="${QUAY_INFRAWATCH_OPERATORS_USERNAME}" --password-stdin quay.io || exit
31+
2932
# Smart Gateway Operator bundle creation
3033

3134
# -- Get hashes for images so they can be replaced in the bundle manifest for relatedImages
@@ -39,7 +42,7 @@ echo "## sg-core image hash: ${SG_CORE_IMAGE_HASH}"
3942

4043
echo "-- Get sg-bridge image hash"
4144
SG_BRIDGE_IMAGE_HASH=$(skopeo inspect docker://quay.io/infrawatch/sg-bridge:"${INSPECTION_TAG}" | jq -c '.Digest' | sed -e 's/^"//' -e 's/"$//' -)
42-
echo "## sg-bridge image hhash: ${SG_BRIDGE_IMAGE_HASH}"
45+
echo "## sg-bridge image hash: ${SG_BRIDGE_IMAGE_HASH}"
4346

4447
echo "-- Create Smart Gateway Operator bundle"
4548
pushd "${GITHUB_WORKSPACE}/smart-gateway-operator/" || exit

0 commit comments

Comments
 (0)