Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci-operator/step-registry/ipi/conf/azure: Get region from Boskos lease #12584

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,8 @@ set -o pipefail

CONFIG="${SHARED_DIR}/install-config.yaml"

case $((RANDOM % 8)) in
0) AZURE_REGION=centralus;;
1) AZURE_REGION=centralus;;
2) AZURE_REGION=centralus;;
3) AZURE_REGION=centralus;;
4) AZURE_REGION=centralus;;
5) AZURE_REGION=centralus;;
6) AZURE_REGION=eastus2;;
7) AZURE_REGION=westus;;
*) echo >&2 "invalid Azure region index"; exit 1;;
esac
echo "Azure region: ${AZURE_REGION}"
REGION="${LEASED_RESOURCE}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the leased resource is something like <region>--<some number> as in https://github.com/openshift/release/pull/14262/files#diff-5169f2a74d1497f38a44e9adc57f6993269a89c3ddf90ab01f5d1d114ef61e58R210

i think we need to transform the lease to region here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need, we split at the -- in ci-operator since openshift/ci-tools#1306.

echo "Azure region: ${REGION}"

cat >> "${CONFIG}" << EOF
baseDomain: ci.azure.devcluster.openshift.com
Expand All @@ -29,5 +19,5 @@ compute:
platform:
azure:
baseDomainResourceGroupName: os4-common
region: ${AZURE_REGION}
region: ${REGION}
EOF