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

Tag component caches #9550

Merged

Conversation

stevenhorsman
Copy link
Member

@stevenhorsman stevenhorsman commented Apr 24, 2024

Add the ability to tag certain components in our ghcr cache, rather than just storing them all by digest. In particular the cloud-api-adaptor implementation of the remote-hypervisor wants to use the agent, agent-opa and guest-components

@stevenhorsman stevenhorsman force-pushed the tag-component-caches branch 4 times, most recently from dbecf55 to c3a0a69 Compare April 25, 2024 16:30
@stevenhorsman stevenhorsman marked this pull request as ready for review April 29, 2024 08:13
@stevenhorsman
Copy link
Member Author

/test

@stevenhorsman stevenhorsman force-pushed the tag-component-caches branch 2 times, most recently from 36a4d8f to 661b3c6 Compare May 1, 2024 13:23
Copy link
Member

@fidencio fidencio 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 @stevenhorsman!

@stevenhorsman stevenhorsman force-pushed the tag-component-caches branch from 661b3c6 to 51fd728 Compare May 14, 2024 19:16
@@ -10,6 10,7 @@ jobs:
build-kata-static-tarball-amd64:
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml
with:
push-to-registry: yes
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @stevenhorsman !

In ./.github/workflows/build-kata-static-tarball-amd64.yaml with push-to-registry=yes it will log-in quay.io but push the image to ghcr.io. Unless I missed something, we should log-in the right registry :D (applies to the arm64, ppc64le and s390x workflows).

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm... just realized that it's passing ARTEFACT_REGISTRY_USERNAME and ARTEFACT_REGISTRY_PASSWORD variables. So likely internally, somewhere, it's loging to ghcr.io

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah - I was puzzled by the ghcr.io login, but assumed it must been done auto-magically by github

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -105,6 99,7 @@ jobs:
RELEASE: ${{ if inputs.stage == 'release' && 'yes' || 'no' }}

- name: store-artifact ${{ matrix.asset }}
if: ${{ matrix.stage != 'release' && (matrix.component == 'agent' || matrix.component == 'coco-guest-components' || matrix.component == 'pause-image') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This bug'ed me!

I think you meant:

matrix.stage != 'release' || (matrix.component != 'agent' && matrix.component != 'coco-guest-components' && matrix.component != 'pause-image')

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm correct here then it needs to adjust the next store-artifacts's ifs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes - you are correct, I think I should have had a ! before (matrix.component == 'agent' || matrix.component == 'coco-guest-components' || matrix.component == 'pause-image'), but your code works too. Thanks for the good spot!

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I've updated the logic on all the build jobs to actually work now. Thanks!

@stevenhorsman stevenhorsman force-pushed the tag-component-caches branch from 51fd728 to e02e9f2 Compare May 14, 2024 20:27
Copy link
Contributor

@wainersm wainersm left a comment

Choose a reason for hiding this comment

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

This will be very useful on peer-pods indeed! Thanks @stevenhorsman !

@stevenhorsman stevenhorsman force-pushed the tag-component-caches branch from e02e9f2 to 71e75d6 Compare May 15, 2024 08:10
@stevenhorsman
Copy link
Member Author

/test

For other projects (e.g. CoCo projects) being able to
access the released versions of components is helpful,
so push these during the release process

Signed-off-by: stevenhorsman <[email protected]>
- Set RELEASE env to 'yes', or 'no', based on if the stage
passed in was 'release', so we can use it in the build scripts

Signed-off-by: stevenhorsman <[email protected]>
- We don't want to ship certain components (agent, coco-guest-components)
as part of the release, but for other consumers it's useful to be able to pull in the components
from oras, so rather than not building them, just don't upload it as part of the release.
- Also make the archs all consistent on not shipping the agent

Signed-off-by: stevenhorsman <[email protected]>
- CoCo wants to use the agent and coco-guest-components cached artifacts
so tag them with a helpful version, so make these easier to get

Signed-off-by: stevenhorsman <[email protected]>

 No commands remaining.
@stevenhorsman stevenhorsman force-pushed the tag-component-caches branch from 71e75d6 to 7f41329 Compare May 15, 2024 15:56
@stevenhorsman
Copy link
Member Author

/test

@stevenhorsman stevenhorsman merged commit d8468cb into kata-containers:main May 16, 2024
294 of 303 checks passed
@stevenhorsman stevenhorsman deleted the tag-component-caches branch June 25, 2024 12:45
stevenhorsman added a commit to stevenhorsman/kata-containers that referenced this pull request Jul 22, 2024
In kata-deploy-binaries.sh we want to understand if we are running
as part of a release, so we need to pass through the RELEASE env
from the workflow, which I missed in
kata-containers#9550

Fixes: kata-containers#9921
stevenhorsman added a commit to stevenhorsman/kata-containers that referenced this pull request Jul 22, 2024
In kata-deploy-binaries.sh we want to understand if we are running
as part of a release, so we need to pass through the RELEASE env
from the workflow, which I missed in
kata-containers#9550

Fixes: kata-containers#9921
Signed-off-by: stevenhorsman <[email protected]>
kruftik pushed a commit to kruftik/kata-containers that referenced this pull request Oct 22, 2024
In kata-deploy-binaries.sh we want to understand if we are running
as part of a release, so we need to pass through the RELEASE env
from the workflow, which I missed in
kata-containers#9550

Fixes: kata-containers#9921
Signed-off-by: stevenhorsman <[email protected]>
kruftik pushed a commit to kruftik/kata-containers that referenced this pull request Oct 22, 2024
In kata-deploy-binaries.sh we want to understand if we are running
as part of a release, so we need to pass through the RELEASE env
from the workflow, which I missed in
kata-containers#9550

Fixes: kata-containers#9921
Signed-off-by: stevenhorsman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/medium Average sized task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants