Skip to content

release: Add the scripts to publish to az marketplace#3812

Open
sayanchowdhury wants to merge 1 commit intomainfrom
sayan/integrate-azurevm-release
Open

release: Add the scripts to publish to az marketplace#3812
sayanchowdhury wants to merge 1 commit intomainfrom
sayan/integrate-azurevm-release

Conversation

@sayanchowdhury
Copy link
Member

@sayanchowdhury sayanchowdhury commented Mar 10, 2026

Add Azure marketplace publishing to Jenkins pipeline to load the items into draft.

To be merged with https://github.com/flatcar/jenkins-os/pull/417

Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
Comment on lines +6 to +14
function release_azure_marketplace() {
# Run a subshell, so the traps, environment changes and global
# variables are not spilled into the caller.
(
set -euo pipefail

_release_azure_marketplace_impl "${@}"
)
}
Copy link
Member

Choose a reason for hiding this comment

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

It's probably something you copied from ci-automation, but you could make it simpler dropping the toplevel braces:

Suggested change
function release_azure_marketplace() {
# Run a subshell, so the traps, environment changes and global
# variables are not spilled into the caller.
(
set -euo pipefail
_release_azure_marketplace_impl "${@}"
)
}
# 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 "${@}"
)

source sdk_container/.repo/manifests/version.txt

local docker_vernum=""
docker_vernum="$(vernum_to_docker_image_version "${vernum}")"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
docker_vernum="$(vernum_to_docker_image_version "${vernum}")"
docker_vernum=$(vernum_to_docker_image_version "${vernum}")

-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 \
Copy link
Member

Choose a reason for hiding this comment

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

Should this be something to mirror on our ghcr?

Comment on lines +262 to +263
if not args.test_mode and plan not in ("alpha", "beta", "stable", "lts2022", "lts2023", "lts2024"):
logging.error("plan value should be either alpha, beta, stable, lts2024, lts2023 or lts2022")
Copy link
Member

Choose a reason for hiding this comment

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

Probably would be nicer to get the lts list from the lts-info file.

logging.error("Required: AZ_TENANT_ID, AZ_CLIENT_ID, AZ_SECRET_VALUE")
return

access_token = generate_partner_center_token(tenant_id, client_id, secret_value)
Copy link
Member

Choose a reason for hiding this comment

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

Does this generate a new access token every time or returns the same thing? If the former, should we destroy those after publishing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants