-
Notifications
You must be signed in to change notification settings - Fork 86
release: Add the scripts to publish to az marketplace #3812
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?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright (c) 2025 The Flatcar Maintainers. | ||
| # Use of this source code is governed by the Apache 2.0 license. | ||
|
|
||
| # Run a subshell, so the traps, environment changes and global | ||
| # variables are not spilled into the caller. | ||
| function release_azure_marketplace() { | ||
| set -euo pipefail | ||
|
|
||
| _release_azure_marketplace_impl "${@}" | ||
| } | ||
|
|
||
| secret_from_base64() { | ||
| local key="$1" | ||
| local base64_string="$2" | ||
|
|
||
| # Decode base64 and extract the value using jq | ||
| echo "$base64_string" | base64 -d | jq -r ".$key" | ||
| } | ||
|
|
||
| function _release_azure_marketplace_impl() { | ||
| source sdk_lib/sdk_container_common.sh | ||
| source ci-automation/ci_automation_common.sh | ||
| source ci-automation/gpg_setup.sh | ||
|
|
||
| source sdk_container/.repo/manifests/version.txt | ||
|
|
||
| local docker_vernum="" | ||
| docker_vernum=$(vernum_to_docker_image_version "${vernum}") | ||
| local container_name="az-marketplace-publish-${docker_vernum}" | ||
|
|
||
| # A job on each worker prunes old mantle images (docker image prune), no need to do it here | ||
| echo "docker rm -f '${container_name}'" >> ./ci-cleanup.sh | ||
|
|
||
| source sdk_container/.env | ||
| AZ_STORAGE_KEY=$(secret_from_base64 "AZ_STORAGE_KEY" "${AZ_MARKETPLACE_PUBLISH}") | ||
| AZ_TENANT_ID=$(secret_from_base64 "AZ_TENANT_ID" "${AZ_MARKETPLACE_PUBLISH}") | ||
| AZ_CLIENT_ID=$(secret_from_base64 "AZ_CLIENT_ID" "${AZ_MARKETPLACE_PUBLISH}") | ||
| AZ_SECRET_VALUE=$(secret_from_base64 "AZ_SECRET_VALUE" "${AZ_MARKETPLACE_PUBLISH}") | ||
|
|
||
| docker run --pull always --rm --name="${container_name}" --net host \ | ||
| -e AZ_STORAGE_KEY="${AZ_STORAGE_KEY}" \ | ||
| -e AZ_TENANT_ID="${AZ_TENANT_ID}" \ | ||
| -e AZ_CLIENT_ID="${AZ_CLIENT_ID}" \ | ||
| -e AZ_SECRET_VALUE="${AZ_SECRET_VALUE}" \ | ||
| -v "${PWD}"/ci-automation/release/azure_marketplace_publish.py:/app/azure_marketplace_publish.py \ | ||
| -w /app \ | ||
| ghcr.io/astral-sh/uv:alpine \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be something to mirror on our ghcr?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I'm directly using the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I'm wondering mostly about mirroring |
||
| uv run azure_marketplace_publish.py \ | ||
| -p "${channel}" \ | ||
| -v "${vernum}" | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.