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: add rock goss checks on PRs #40

Merged
merged 20 commits into from
Dec 2, 2024
Merged

feat: add rock goss checks on PRs #40

merged 20 commits into from
Dec 2, 2024

Conversation

lucabello
Copy link
Contributor

Issue

Rocks currently have no tests on PR, making it impossible to know if they're working (besides trying to pack them), which in turn prevents us from auto-merging them.

Solution

Use noctua and goss to:

  1. run a packed rock in a Kubernetes pod
  2. install goss in the pod, and copy the goss.yaml file into it
  3. run goss validate inside it

Testing Instructions

Get noctua (here, you can pip install it from git) and this rock repo (or any rock repo, if you write the goss.yaml).

  1. cd <version> && rockcraft pack
  2. noctua rock test <rock_file> --goss-file=../goss.yaml --one-shot
  3. Watch the magic happen

@lucabello lucabello marked this pull request as ready for review November 22, 2024 14:01
goss.yaml Show resolved Hide resolved
@lucabello lucabello merged commit 34cb1b0 into main Dec 2, 2024
1 check passed
@lucabello lucabello deleted the feature/rock-checks branch December 2, 2024 13:54
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 this pull request may close these issues.

2 participants