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): setup CI to push scorecard, bundle images and run scorecard #588

Merged
merged 12 commits into from
May 25, 2023

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented May 19, 2023

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Fixes: #227, #493
Depends on #589

Description of the change:

  • Add CI to push bundle and scorecard image (if not exists) to quay.io.
  • Add CI to run envtest and scorecard.

Motivation for the change:

See #227, #493

How to manually test:

See CI job status:

Push jobs on main push is failing on my repo since it does not have access to cryostat/cryostat but build steps seems to work fine.

Others

We also need to remove checks for build Expected — Waiting for status to be reported as CI job name is changed.

@tthvo tthvo added feat New feature or request ci labels May 19, 2023
@tthvo tthvo force-pushed the ci branch 2 times, most recently from 601c73f to 4bd8cea Compare May 19, 2023 20:13
@tthvo tthvo force-pushed the ci branch 2 times, most recently from a944f83 to be8aee9 Compare May 19, 2023 20:55
@tthvo tthvo linked an issue May 19, 2023 that may be closed by this pull request
@tthvo tthvo marked this pull request as draft May 19, 2023 21:20
@tthvo tthvo force-pushed the ci branch 10 times, most recently from 7d569db to d64efe6 Compare May 22, 2023 06:38
@tthvo tthvo requested review from andrewazores, ebaron and maxcao13 May 22, 2023 06:45
@tthvo tthvo marked this pull request as ready for review May 22, 2023 06:46
Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

I've seen this action before: https://github.com/helm/kind-action. Not sure if it would make things any easier for this PR, but wanted to let you know it exists.

@tthvo
Copy link
Member Author

tthvo commented May 23, 2023

I've seen this action before: https://github.com/helm/kind-action.

Thanks! We still need to pass in the path to config file. Tho, we can set a fixed version of kind and kubectl. Is there a version we want to set or whatever version (seems like latest) comes with ubuntu-latest is fine?

Makefile Outdated Show resolved Hide resolved
Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

One thing I noticed that's missing here is a CI image for the operator controller image. This means that any code changes aren't reflected in the bundle image, only YAML changes. We should push the operator image to ghcr.io and then pass that image to make bundle with OPERATOR_IMG.

@tthvo
Copy link
Member Author

tthvo commented May 25, 2023

We should push the operator image to ghcr.io and then pass that image to make bundle with OPERATOR_IMG.

Do u think we should patch the manager's pod template or the operator SA with the pullImageSecret?

@tthvo
Copy link
Member Author

tthvo commented May 25, 2023

operator-sdk run bundle is stuck waiting for the deployment to roll out. Let me try patching the deployment config before generating bundle.

https://github.com/tthvo/cryostat-operator/actions/runs/5082564293/jobs/9132453979

@tthvo
Copy link
Member Author

tthvo commented May 25, 2023

Not the most intuitive way to patch imagePullSecrets but seems to work nicely:

Patch: 46e6741

Test run: https://github.com/tthvo/cryostat-operator/actions/runs/5083194894/jobs/9133896077

How about that?

@github-actions
Copy link

This PR/issue depends on:

@tthvo
Copy link
Member Author

tthvo commented May 25, 2023

Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Works well! Awesome job on getting this done @tthvo! Thank you!

@andrewazores
Copy link
Member

This is awesome, finally knocking off a major piece of that puzzle for doing CI in a k8s environment.

@tthvo
Copy link
Member Author

tthvo commented May 25, 2023

Niceee thanks you^^ Happy I could help with it :))

@andrewazores andrewazores merged commit c60906c into cryostatio:main May 25, 2023
@tthvo tthvo deleted the ci branch May 25, 2023 20:06
@tthvo tthvo mentioned this pull request Jun 7, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci feat New feature or request safe-to-test
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Build and push a scorecard image with CI Push bundle CI builds to Quay
4 participants