-
Notifications
You must be signed in to change notification settings - Fork 68
Publish AZ SIG images #3156
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
base: main
Are you sure you want to change the base?
Publish AZ SIG images #3156
Conversation
Signed-off-by: Sayan Chowdhury <[email protected]>
8999878
to
85622c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks.
Just a general tip, although Gentoo is admittedly quote-heavy in its ebuilds, you don't need to quote:
- When assigning
FOO=${}
orFOO=$()
- Inside
[[ ]]
unless it's a variable on the right-hand-side. case ${FOO} in
fi | ||
|
||
echo "Fetching target regions" | ||
TARGET_REGIONS=$(az account list-locations -o json | jq -r '.[] | select( .metadata.regionType != "Logical" ) | .name' | sort | grep -v -E "(${BLACKLISTED_TARGET_REGIONS// /|})" | tr '\n' ' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TARGET_REGIONS=$(az account list-locations -o json | jq -r '.[] | select( .metadata.regionType != "Logical" ) | .name' | sort | grep -v -E "(${BLACKLISTED_TARGET_REGIONS// /|})" | tr '\n' ' ') | |
TARGET_REGIONS=$(az account list-locations -o json | jq --args -r '[.[] | select(.metadata.regionType != "Logical") | .name] - $ARGS.positional | sort | join(" ")' ${BLACKLISTED_TARGET_REGIONS}) |
echo "Blob doesn't exist. Downloading flatcar-linux-${FLATCAR_GALLERY_VERSION}-${FLATCAR_CHANNEL}-${FLATCAR_ARCH}" | ||
# Download the VHD file (only if blob doesn't exist) | ||
echo "Downloading ${FLATCAR_LOCAL_FILE_URL}..." | ||
if ! curl -L -o "/data/${FLATCAR_LOCAL_FILE_NAME}.bz2" "${FLATCAR_LOCAL_FILE_URL}"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ! curl -L -o "/data/${FLATCAR_LOCAL_FILE_NAME}.bz2" "${FLATCAR_LOCAL_FILE_URL}"; then | |
if ! curl -f -L -o "/data/${FLATCAR_LOCAL_FILE_NAME}.bz2" "${FLATCAR_LOCAL_FILE_URL}"; then |
fi | ||
|
||
FLATCAR_GALLERY_IMAGE_NAME="flatcar-${channel}-${arch}" | ||
version=$(echo "${vernum}" | cut -d '-' -f2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version=$(echo "${vernum}" | cut -d '-' -f2) | |
version=$(cut -d '-' -f2 <<< "${vernum}") |
|
||
local date="" | ||
if [[ "$vernum" == *nightly* ]]; then | ||
date=$(echo "${vernum}" | cut -d '-' -f4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date=$(echo "${vernum}" | cut -d '-' -f4) | |
date=$(cut -d '-' -f4 <<< "${vernum}") |
To be merged with https://github.com/flatcar/jenkins-os/pull/371
The script publishes vhd images to Azure Shared Image Galleries
Pending Item:
az_sig_publish
. lbzip2 is not available in package repos. Also, need to check if curl works.CI http://jenkins.infra.kinvolk.io:8080/job/container/job/az_sig_publish/98/consoleFull