Skip to content

Commit a1e4cf2

Browse files
build(e2e): Generate env.yml file, fix yaml config path
1 parent 94b1920 commit a1e4cf2

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/node-ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: mkdocs build
4141
- name: Whether e2e should run
4242
run: echo Running e2e - {{ inputs.e2e }}
43-
- name: Write .env file for Docker
43+
- name: Write .env and env.yml files for Docker
4444
if: inputs.e2e
4545
run: |
4646
touch __tests__/e2e/.env
@@ -70,6 +70,12 @@ jobs:
7070
echo TRANSITFEEDS_KEY= ${{ secrets.TRANSITFEEDS_KEY }} >> __tests__/e2e/.env
7171
touch __tests__/e2e/server/datatools.pem
7272
echo ${{ secrets.AUTH0_DATATOOLS_PEM }} | base64 --decode > __tests__/e2e/server/datatools.pem
73+
touch configurations/default/env.yml
74+
echo AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} >> configurations/default/env.yml
75+
echo AUTH0_CONNECTION_NAME: ${{ secrets.AUTH0_CONNECTION_NAME }} >> configurations/default/env.yml
76+
echo AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }} >> configurations/default/env.yml
77+
echo GRAPH_HOPPER_KEY: ${{ secrets.GRAPH_HOPPER_KEY }} >> configurations/default/env.yml
78+
echo MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }} >> configurations/default/env.yml
7379
7480
- name: Run e2e tests
7581
if: inputs.e2e

__tests__/e2e/ui/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ RUN yarn
1111
COPY . /datatools-build/
1212
COPY configurations/default /datatools-config/
1313

14-
RUN env YAML_CONFIG=/datatools-build/configurations/default/env.yml yarn build
15-
COPY . /datatools-build/
14+
RUN env YAML_CONFIG=/datatools-config/env.yml yarn build
1615
CMD yarn e2e-preview --port 9966 --host

docker/ui/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ COPY configurations/default /datatools-config/
1313
# Copy the tmp file to the env.yml if no env.yml is present
1414
RUN cp -R -u -p /datatools-config/env.yml.tmp /datatools-config/env.yml
1515

16-
RUN env YAML_CONFIG=/datatools-build/configurations/default/env.yml yarn build
17-
COPY . /datatools-build/
16+
RUN env YAML_CONFIG=/datatools-config/env.yml yarn build
1817
CMD yarn e2e-preview --port 9966 --host

0 commit comments

Comments
 (0)