Skip to content

Commit

Permalink
change CONTEST_CONTENT_LATEST to CONTEST_CONTENT_BRANCH
Browse files Browse the repository at this point in the history
This is to more closely match the openscap variables.

Signed-off-by: Jiri Jaburek <[email protected]>
  • Loading branch information
comps authored and mildas committed Apr 16, 2024
1 parent d5cd832 commit b2fcff5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,20 @@ on Red Hat Enterprise Linux.
content.
- Note that this may fail if the content is located on a read-only path.

- `CONTEST_CONTENT_LATEST`
- Set to `1` to use latest content available in the
- `CONTEST_CONTENT_BRANCH`
- Specify a branch name of the
[CaC/content](https://github.com/ComplianceAsCode/content/) project.
- This will download content from the default branch and automatically pre-set
`CONTEST_CONTENT` to point to it.
- This will download content from the specified branch and automatically
pre-set `CONTEST_CONTENT` to point to it.
- Essentially, this is like `CONTEST_CONTENT` but without you having to
provide a cloned directory, Contest automatically clones it for you.
- Do not specify `CONTEST_CONTENT` in combination with this option.

- `CONTEST_CONTENT_PR`
- Specify a numerical Pull Request ID (no `#` or other letters) of the
[CaC/content](https://github.com/ComplianceAsCode/content/) project.
- This will download content from the specified PR and automatically pre-set
`CONTEST_CONTENT` to point to it.
- This is like `CONTEST_CONTENT_LATEST`, but instead of using the default
branch, it checks out repository contents specific to the pull request.
- This is like `CONTEST_CONTENT_BRANCH`, but it uses content from the
pull request instead of a branch.
- Do not specify `CONTEST_CONTENT` in combination with this option.

- `CONTEST_OSCAP_BRANCH`
Expand Down
4 changes: 2 additions & 2 deletions plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ adjust:
name: Download and build latest or pull request content
script: |
set -xe
if [ -n "$CONTEST_CONTENT_LATEST" ]; then
ref=HEAD
if [ -n "$CONTEST_CONTENT_BRANCH" ]; then
ref="refs/heads/$CONTEST_CONTENT_BRANCH"
elif [ -n "$CONTEST_CONTENT_PR" ]; then
ref="refs/pull/$CONTEST_CONTENT_PR/head"
else
Expand Down

0 comments on commit b2fcff5

Please sign in to comment.