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

feat(CI): Build container image #397

Merged
merged 19 commits into from
Jul 9, 2024

Conversation

mwangggg
Copy link
Member

@mwangggg mwangggg commented May 6, 2024

related to: cryostatio/cryostat-operator#791

This CI workflow builds the agent image, then packages it in the quarkus-test sample application and pushes it to the crysotat quay repo.

example workflow in my forked -agent repo: https://github.com/mwangggg/cryostat-agent/actions/runs/8974812712

@mwangggg mwangggg requested review from andrewazores and ebaron May 6, 2024 19:04
@mergify mergify bot added the safe-to-test label May 6, 2024
@mwangggg mwangggg force-pushed the build-container-image branch from 136e73f to d40e74b Compare May 6, 2024 19:05
@mwangggg
Copy link
Member Author

mwangggg commented May 6, 2024

Screenshot from 2024-05-06 15-06-08
The CI successfully pushed the correct quarkus-test image into my quay repo- I tried it in cryostat3 and it works as expected.
Screenshot from 2024-05-06 15-06-33
The CI also comments the correct image in the PR

@mwangggg mwangggg added the ci label May 6, 2024
@mwangggg
Copy link
Member Author

mwangggg commented May 6, 2024

@mwangggg mwangggg force-pushed the build-container-image branch from 69718ed to 7e374bc Compare July 5, 2024 14:32
@andrewazores
Copy link
Member

Looking good. Could you get this to run in your fork to validate that we haven't missed anything among the recent changes? Obviously the quay.io piece won't work, unless you also set up your fork with the token secret.

@mwangggg
Copy link
Member Author

mwangggg commented Jul 5, 2024

I finally got a workflow that works- I completely forgot that there's no easy way to get the PR associated with a push event, so I had to remove the the safe-to-test label checking and commenting the quay image after it's been successfully pushed: https://github.com/mwangggg/cryostat-agent/actions/runs/9813147572

@andrewazores
Copy link
Member

Ahh, yes, that makes sense. I think it's fine to just have it work on push, I don't think there will be that many PRs going on in this repo.

https://quay.io/repository/redhat-java-monitoring/quarkus-cryostat-agent?tab=tags

image

Workflow results look good. I think it makes sense to tag this container image with the Agent version (as your workflow did) rather than the application's own version, too.

@mwangggg mwangggg force-pushed the build-container-image branch from b17a086 to d4d29c4 Compare July 5, 2024 21:23
@andrewazores andrewazores merged commit d5c3d0c into cryostatio:main Jul 9, 2024
9 checks passed
@andrewazores
Copy link
Member

https://github.com/cryostatio/cryostat-agent/actions/runs/9861895909/workflow

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

Successfully merging this pull request may close these issues.

2 participants