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

Build example recipes in GitHub Actions #459

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,50 @@ jobs:
${{matrix.test.variables}}
${{matrix.test.case}}/test.yaml

example-tests:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
example:
- ospack-debian
name: Example recipe ${{matrix.example}}
steps:
- name: Repository checkout
uses: actions/checkout@v3

- name: Download artifact
uses: actions/download-artifact@v3
with:
name: debos-image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/debos-image.tar

- name: run in docker image
run:
docker run
--cgroupns=private
-v $(pwd)/tests:/tests
-w /tests
--tmpfs /scratch:exec
--tmpfs /run
--privileged
-e TMP=/scratch
-e SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=1
debos -v
${{matrix.example}}/${{matrix.example}}.yaml

# Job to key success status against
allgreen:
name: allgreen
if: always()
needs:
- unit-tests
- recipe-tests
- example-tests
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand All @@ -192,6 +229,7 @@ jobs:
needs:
- unit-tests
- recipe-tests
- example-tests
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -268,6 +306,7 @@ jobs:
- check-dockerhub-secrets
- unit-tests
- recipe-tests
- example-tests
if: |
needs.check-dockerhub-secrets.outputs.has-secrets == 'true' &&
github.event_name != 'pull_request'
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@ this:

debos -t image:"debian-arm64.tgz" example.yaml

## Other examples
## Other example recipes

Example recipes are collected in a separate repository:

https://github.com/go-debos/debos-recipes
See the [bundled example recipes](docs/examples) for some more detailed example
recipes. Additional more detailed example recipes are stored under [debos-recipes](https://github.com/go-debos/debos-recipes).

## Environment variables

Expand Down
Loading