Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartleeks committed Feb 23, 2023
1 parent 5c26f71 commit cd95643
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,17 @@ jobs:

- name: Run test
uses: ./
env: # TEST_ENV_VALUE1 is set via devcontainer.json using a localEnv reference
TEST_ENV_VALUE1: SetViaDevcontainerJsonLocalEnv
with:
subFolder: github-tests/Dockerfile/env-vars-on-post-create
imageName: ghcr.io/devcontainers/ci/tests/env-vars-on-post-create
env: |
TEST_ENV_VALUE=testing123
env: | # TEST_ENV_VALUE2 is an additional env var to pass to the container
TEST_ENV_VALUE2=AdditionalEnvVar
runCmd: |
cat marker.txt
cat marker.txt | grep 'post-create: TEST_ENV_VALUE=testing123'
cat marker.txt | grep 'post-create: TEST_ENV_VALUE1=SetViaDevcontainerJsonLocalEnv'
cat marker.txt | grep 'post-create: TEST_ENV_VALUE2=AdditionalEnvVar'
imageTag: ${{ needs.build.outputs.image_tag }}
push: ${{ needs.build.outputs.image_push_option }}
eventFilterForPush: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/bash
set -e

echo "post-create: TEST_ENV_VALUE=${TEST_ENV_VALUE}" >> marker.txt
echo "**************************************************"
echo "*** In post-create.sh "
echo "*** TEST_ENV_VALUE=${TEST_ENV_VALUE}"
echo "*** TEST_ENV_VALUE2=${TEST_ENV_VALUE2}"
echo "**************************************************"
echo "post-create: TEST_ENV_VALUE=${TEST_ENV_VALUE}" > marker.txt
echo "post-create: TEST_ENV_VALUE2=${TEST_ENV_VALUE2}" >> marker.txt

0 comments on commit cd95643

Please sign in to comment.