Add runner dir test output to goss

This commit is contained in:
Marcus Young
2024-09-09 11:34:02 -05:00
parent ec8239bf41
commit 11455b24f9
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -87,16 +87,20 @@ The test file expects the image to test as an environment variable `GH_RUNNER_IM
To test:
```
$ # need to set minimum vars for the goss test interpolation
$ echo "os: ubuntu" >goss_vars.yaml
$ echo "oscodename: focal >>goss_vars.yaml
$ echo "arch: x86_64" >>goss_vars.yaml
$ docker build -t my-base-test -f Dockerfile.base .
$ # Run the base test from Dockerfile.base on the current git HEAD
$ GH_RUNNER_IMAGE="my-base-test" GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true \
$ GH_RUNNER_IMAGE="my-base-test" GOSS_VARS=goss_vars.yaml GOSS_FILE=goss_base.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep -e RUNNER_NAME=test -e DEBUG_ONLY=true \
${GH_RUNNER_IMAGE} \
10
$ # Use the base image in your final
$ sed -i.bak 's/^FROM.*/FROM my-base-test/g' Dockerfile
$ docker build -t my-full-test -f Dockerfile .
$ # Run the full test from Dockerfile.base on the current git HEAD
$ GH_RUNNER_IMAGE="my-full-test" GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \
$ GH_RUNNER_IMAGE="my-full-test" GOSS_VARS=goss_vars.yaml GOSS_FILE=goss_full.yaml GOSS_SLEEP=1 dgoss run --entrypoint /usr/bin/sleep \
-e DEBUG_ONLY=true \
-e RUNNER_NAME=huzzah \
-e REPO_URL=https://github.com/myoung34/docker-github-actions-runner \
+1
View File
@@ -6,6 +6,7 @@ command:
- ""
- "Disable automatic registration: true"
- "Random runner suffix: true"
- "Runner workdir: /tmp/a"
- "Runner name: huzzah"
- "Labels: blue,green"
- "Runner Group: wat"