mirror of
https://github.com/hanzoai/docker-github-actions-runner.git
synced 2026-09-30 21:42:55 +00:00
Add runner dir test output to goss
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user