actions: config-options: test for envs and env-file (#722)
Refs: forgejo/runner#287 Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/722 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
parent
5b31c12efe
commit
dd31a59c1e
4 changed files with 16 additions and 2 deletions
|
|
@ -11,6 +11,14 @@ jobs:
|
||||||
- run: |
|
- run: |
|
||||||
! test -f /srv/example-config-options-volume-invalid
|
! test -f /srv/example-config-options-volume-invalid
|
||||||
- run: |
|
- run: |
|
||||||
|
set -x
|
||||||
test "$FROB" = "NITZ"
|
test "$FROB" = "NITZ"
|
||||||
- run: |
|
- run: |
|
||||||
|
set -x
|
||||||
|
test "$VAR_FROM_ENV_FILE" = "VALUE_FROM_ENV_FILE"
|
||||||
|
- run: |
|
||||||
|
set -x
|
||||||
|
test "$VAR_FROM_ENV_IN_CONFIG" = "VALUE_FROM_ENV_IN_CONFIG"
|
||||||
|
- run: |
|
||||||
|
set -x
|
||||||
test "$(cat /etc/hostname)" = customname
|
test "$(cat /etc/hostname)" = customname
|
||||||
|
|
|
||||||
1
actions/example-config-options/env_file
Normal file
1
actions/example-config-options/env_file
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
VAR_FROM_ENV_FILE=VALUE_FROM_ENV_FILE
|
||||||
|
|
@ -6,7 +6,9 @@ log:
|
||||||
runner:
|
runner:
|
||||||
file: .runner
|
file: .runner
|
||||||
capacity: 1
|
capacity: 1
|
||||||
env_file: .env
|
envs:
|
||||||
|
VAR_FROM_ENV_IN_CONFIG: VALUE_FROM_ENV_IN_CONFIG
|
||||||
|
env_file: env_file
|
||||||
timeout: 3h
|
timeout: 3h
|
||||||
insecure: true
|
insecure: true
|
||||||
fetch_timeout: 5s
|
fetch_timeout: 5s
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
>/srv/example-config-options-volume-valid
|
>/srv/example-config-options-volume-valid
|
||||||
>/srv/example-config-options-volume-invalid
|
>/srv/example-config-options-volume-invalid
|
||||||
FORGEJO_RUNNER_CONFIG=$EXAMPLE_DIR/runner-config.yaml forgejo-runner.sh reload
|
TMPDIR=$(mktemp -d)
|
||||||
|
cp $EXAMPLE_DIR/runner-config.yaml $EXAMPLE_DIR/env_file $TMPDIR
|
||||||
|
sed -i -e "s|env_file:.*|env_file: $TMPDIR/env_file|" $TMPDIR/runner-config.yaml
|
||||||
|
FORGEJO_RUNNER_CONFIG=$TMPDIR/runner-config.yaml forgejo-runner.sh reload
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue