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

Build and Publish Rocks workflows #2

Conversation

addyess
Copy link
Contributor

@addyess addyess commented Jan 18, 2024

🚧 Do not merge until this is first merged 🚧

canonical/operator-workflows#243


Using the operator-workflows action

  • builds and push the rock to a repository packages

  • Determine the next available patch tag for the image (eg -ck2)

  • Create a multiarch manifest for the images pushed with this new tag

How

each rock in the repo produces a list of metadata for the built images.

{
    "name": "<rock.name>",
    "version": "<rock.version>",
    "path": "<path to rockcraft.yaml>",
    "arch":  "<rock platform>",
    "image": "<image name in ghcr.io>"
}

The action scripts Assemble Image Tags find the next best patch version matching the base version in the rockcraft.yaml's version field

For instance, if the rockcraft cilium:1.0.0 is built, each platform with produce an image cilium:<filehash-sum>-<arch> image.

This actions searches all the image tags starting with canonical/cilium:1.0.0-. If there are none, the sum of all those tags is 0 indicating this is the 0th patch rev. If the sum is 20, this is the 20th patch rev.

The multi-arch manifest created will be canonical:cilium:1.0.0-ck0 in which the referenced images will be annotated for their correct architecture.

@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from 6041fdc to b33a6c8 Compare January 18, 2024 19:33
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from b33a6c8 to 91b693c Compare January 18, 2024 19:34
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch 16 times, most recently from a39c407 to 5e6c36c Compare January 21, 2024 23:31
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from 5e6c36c to da88c85 Compare January 22, 2024 00:06
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch 5 times, most recently from 8ac132b to 882f9d4 Compare January 22, 2024 19:05
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from 882f9d4 to 1fb5726 Compare January 22, 2024 19:23
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from 7fb19c8 to 9fc47a3 Compare January 22, 2024 19:56
working-directory: ${{ inputs.working-directory }}
build-rocks:
name: Build rocks
uses: addyess/operator-workflows/.github/workflows/build_rocks.yaml@KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cannot merge until this is first merged
canonical/operator-workflows#243

@addyess addyess marked this pull request as ready for review January 22, 2024 20:20
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from ba2db7d to 3cf0245 Compare January 24, 2024 03:36
@addyess addyess force-pushed the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch from 3cf0245 to ef24197 Compare January 24, 2024 14:05
@addyess addyess closed this Jan 26, 2024
@addyess addyess deleted the KU-52-reuse-gh-actions-from-canonical-to-build-amd-64-rocks-and-push-to-ghcr branch January 26, 2024 03:26
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.

1 participant