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

[wip] automate the capi image building and publishing #959

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sayanchowdhury
Copy link
Member

This is a WIP PR, not yet tested.

ref flatcar/Flatcar#1104

Comment on lines 10 to 13
_="
${AZURE_CLIENT_ID}
${AZURE_CLIENT_SECRET}
"
Copy link
Member

Choose a reason for hiding this comment

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

If we don't require them as env vars, we can remove this

Copy link
Member

@pothos pothos Jun 30, 2023

Choose a reason for hiding this comment

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

If you want to also support usage through manual invocation, you can move this to the else case of the block below.

# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# >>> This file is supposed to be SOURCED from the repository ROOT. <<<
Copy link
Member

Choose a reason for hiding this comment

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

If we don't really need sourcing, we can simplify this and expect the script to be invoked directly. Sourcing always modifies shared global state and is hard to reason about.

Comment on lines 80 to 82
if sig-image-version-exists; then
return
fi
Copy link
Member

Choose a reason for hiding this comment

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

This is not the wanted behavior when we have to rerun the release step. It should replace/republish.

Comment on lines 112 to 114
if sig-image-version-exists; then
return
fi
Copy link
Member

Choose a reason for hiding this comment

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

This is not the wanted behavior when we have to rerun the release step. It should replace/republish.

ci-automation/azure-sig.sh Outdated Show resolved Hide resolved
}

function _capi_image_build_impl() {
local arch="$1"
Copy link
Member

Choose a reason for hiding this comment

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

For the high level entry point maybe let's not require the architecture to be passed from the jenkins job where it would have to have a for loop. Either this script here can build and publish arm64 or it can't because the feature is missing.



for elem in parsed_data.get('schedules', []):
print(elem.get('next').get('release'))
Copy link
Member

Choose a reason for hiding this comment

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

This should filter out releases with a target in the future. The yaml entry looks like that: targetDate: 2023-07-12

Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants