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

Support testing CaC/content and openscap build from pull requests #124

Closed
comps opened this issue Mar 20, 2024 · 1 comment · Fixed by #127
Closed

Support testing CaC/content and openscap build from pull requests #124

comps opened this issue Mar 20, 2024 · 1 comment · Fixed by #127

Comments

@comps
Copy link
Contributor

comps commented Mar 20, 2024

  • For https://github.com/ComplianceAsCode/content , it means extending /plans/upstream to support --branch, or rather to rewrite git-clone to git-init + git-fetch, so we can specify a non-branch ref such as refs/pull/1234/head, effectively cloning (and building in get_content()) a content snapshot from PR #1234.
  • For openscap, it would mean extending the same plan (or /plans/main.fmf for all plans) to download https://copr.fedorainfracloud.org/coprs/packit/OpenSCAP-openscap-{PR_ID}/repo/centos-stream-{versions.rhel.major}/packit-OpenSCAP-openscap-{PR_ID}-centos-stream-{versions.rhel.major}.repo to /etc/yum.repos.d and calling dnf upgrade openscap.
    • Since this adds an HTTP-style git repo (not a file:// one), the repo will be automagically used by all tests that propagate HTTP repos to VMs, incl. /hardening/{oscap,ansible,image-builder}.
@comps
Copy link
Contributor Author

comps commented Mar 20, 2024

In a round-about way, this could provide an alternative to #94

We probably also want to dnf check-upgrade / exit status 100 for an openscap PR, just to verify that there's a valid build present and the test run wasn't triggered too early.

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 a pull request may close this issue.

1 participant