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

k8s image content from PRs: fix execution and add instruction how to use the image #11459

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

yuumasato
Copy link
Member

@yuumasato yuumasato commented Jan 19, 2024

Description:

  • Fix invalid reference when checking out
  • Add an option to utils/build_ds_container.py just creates ProfileBundle based on a k8s content image.
  • Add instructions to the image tag comment on how to use the image.

Rationale:

  • Make it visible how one can deploy and use a k8s content image from the PR.
  • This PR'r source repos is the remote to allow the action changes to apply unhinged.

Review Hints:

  • Grab a cluster and run the commands.

@yuumasato yuumasato added the OpenShift OpenShift product related. label Jan 19, 2024
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@yuumasato yuumasato changed the title Make it visible how to deploy the k8s image built from the PR Make it visible and easier to deploy the k8s image built from the PR Jan 19, 2024
Copy link

github-actions bot commented Jan 19, 2024

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:11459

Click here to see how to deploy it

If you alread have Compliance Operator deployed:
utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:11459

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and:
CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:11459 make deploy-local

@yuumasato yuumasato force-pushed the streamline_k8s_image_deployment branch from f46b0f4 to 0cb1b09 Compare January 19, 2024 17:30
Copy link
Member

@Mab879 Mab879 left a comment

Choose a reason for hiding this comment

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

Just a minor spelling suggestion

.github/workflows/k8s-content-pr.yaml Outdated Show resolved Hide resolved
@yuumasato yuumasato force-pushed the streamline_k8s_image_deployment branch 6 times, most recently from 861896a to 15178b6 Compare February 1, 2024 15:15
@openshift-merge-robot openshift-merge-robot added the needs-rebase Used by openshift-ci bot. label Feb 4, 2024
Add option to use a k8s container image to create Profile Bundles.
This makes it easy to reference any k8s content image to create Profile
Bundles for OCP4 and RHCOS4.
Fix usage of pr_number stored by Kubernetes content image for PR
trigger.
Use thollander's comment pull request action.
It can upsert the comment with the built content image, instead of
creating new comments.
@yuumasato yuumasato force-pushed the streamline_k8s_image_deployment branch from 15178b6 to 5da44a1 Compare February 14, 2024 13:46
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Used by openshift-ci bot. label Feb 14, 2024
@yuumasato
Copy link
Member Author

yuumasato commented Feb 14, 2024

@Vincent056 Hey, this should fix consumption of the pr_number from the trigger job.
https://github.com/ComplianceAsCode/content/actions/runs/7902178431/job/21567253251

I have reverted to using thollander's action as well, as it provides Upsert capability.

But this PR needs to be merged to get into effect.

Copy link

codeclimate bot commented Feb 14, 2024

Code Climate has analyzed commit 5da44a1 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 58.3% (0.0% change).

View more on Code Climate.

@yuumasato yuumasato changed the title Make it visible and easier to deploy the k8s image built from the PR k8s image content from PRs: fix execution and add instruction how to use the image Feb 14, 2024
Copy link
Collaborator

@rhmdnd rhmdnd left a comment

Choose a reason for hiding this comment

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

Looks good - just a comment about reorganizing our tools to make it simpler to understand the responsibility of the build script.

Perhaps we can tackle that in a separate PR though.

utils/build_ds_container.py Show resolved Hide resolved
.github/workflows/k8s-content-pr.yaml Show resolved Hide resolved
@rhmdnd
Copy link
Collaborator

rhmdnd commented Feb 15, 2024

Let's tackle separating the image push functionality from the build script in a separate PR.

@yuumasato
Copy link
Member Author

Let's tackle separating the image push functionality from the build script in a separate PR.

Sure I'll tackle that soon after we get the action working.

@rhmdnd rhmdnd merged commit af0494e into master Feb 15, 2024
52 checks passed
@yuumasato yuumasato deleted the streamline_k8s_image_deployment branch February 15, 2024 18:10
@yuumasato yuumasato added this to the 0.1.73 milestone Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenShift OpenShift product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants