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

ROCKS 1452 - Refactor Build Rock workflow to be externally reusable #233

Conversation

clay-lake
Copy link
Contributor

@clay-lake clay-lake commented Aug 23, 2024

Note: This PR depends on #224
This pull request refactors the build workflow to enable re-usability by external repositories. There is an example application of this in the rocks-toolbox. A example job run can be found here: https://github.com/canonical/rocks-toolbox/actions/runs/10524164671

@clay-lake clay-lake changed the title DRAFT ROCKS 1452 - Refactor Build Rock workflow to be externally reusable DRAFT - ROCKS 1452 - Refactor Build Rock workflow to be externally reusable Aug 23, 2024
@clay-lake clay-lake changed the title DRAFT - ROCKS 1452 - Refactor Build Rock workflow to be externally reusable ROCKS 1452 - Refactor Build Rock workflow to be externally reusable Aug 26, 2024
@clay-lake clay-lake marked this pull request as ready for review September 3, 2024 08:26
@clay-lake
Copy link
Contributor Author

Since it is not part of the checks, here is an example Test OCI Factory run from e6e3c29
https://github.com/canonical/oci-factory/actions/runs/10678234515

Copy link
Contributor

@zhijie-yang zhijie-yang left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! Leaving several nitpicks:

.github/workflows/Build-Rock.yaml Outdated Show resolved Hide resolved
src/build_rock/configure/generate_build_matrix.py Outdated Show resolved Hide resolved
.github/workflows/Build-Rock.yaml Outdated Show resolved Hide resolved
.github/workflows/Build-Rock.yaml Show resolved Hide resolved
.github/workflows/Image.yaml Show resolved Hide resolved
src/shared/github_output.py Show resolved Hide resolved
tests/fixtures/__ini__.py Outdated Show resolved Hide resolved
tests/integration/test_convert_junit_xml_to_markdown.py Outdated Show resolved Hide resolved
tests/unit/test_generate_build_matrix.py Outdated Show resolved Hide resolved
tests/unit/test_github_output.py Outdated Show resolved Hide resolved
Copy link
Contributor

@linostar linostar left a comment

Choose a reason for hiding this comment

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

Good work. I left few minor remarks and nitpicks.

.github/workflows/Build-Rock.yaml Outdated Show resolved Hide resolved
.github/workflows/Build-Rock.yaml Outdated Show resolved Hide resolved
.github/workflows/Build-Rock.yaml Show resolved Hide resolved
.github/workflows/Build-Rock.yaml Outdated Show resolved Hide resolved
.github/workflows/Build-Rock.yaml Show resolved Hide resolved
@clay-lake clay-lake force-pushed the ROCKS-1452/oci-factory-refactor-build-rock-to-be-externally-reusable branch from 370b1aa to 134291d Compare September 6, 2024 11:38
…ROCKS-1452/oci-factory-refactor-build-rock-to-be-externally-reusable
…ally-reusable' of https://github.com/canonical/oci-factory into ROCKS-1452/oci-factory-refactor-build-rock-to-be-externally-reusable
@clay-lake clay-lake requested a review from a team as a code owner September 16, 2024 11:37
Copy link
Contributor

@zhijie-yang zhijie-yang left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

.github/workflows/Build-Rock.yaml Outdated Show resolved Hide resolved
@cjdcordeiro
Copy link
Collaborator

@clay-lake
Copy link
Contributor Author

@cjdcordeiro I found why 1.0.1 is not building. Testing the prepare_single_image_build_matrix.py script (from main) seems to drop a build entirely if any of the releases in the image.yaml are EOL. Is that intended? I'll fix in another PR if not.

Instead of testing mock-rock/1.0 here, I made a multi-arch test build in rocks-toolbox using an external workflow call.
https://github.com/canonical/rocks-toolbox/actions/runs/11365735363

@cjdcordeiro
Copy link
Collaborator

good catch @clay-lake

That is NOT the desired behaviour indeed. We should only ignore the track, not the whole build.

Copy link
Collaborator

@cjdcordeiro cjdcordeiro left a comment

Choose a reason for hiding this comment

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

great. thanks for the changes :) looking good.
we need to make sure we multi-arch tests are running again so pls let me know once the fix PR for the bad EOL filtering comes up

@cjdcordeiro cjdcordeiro merged commit 398d4a5 into main Oct 17, 2024
@cjdcordeiro cjdcordeiro deleted the ROCKS-1452/oci-factory-refactor-build-rock-to-be-externally-reusable branch October 17, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants