Skip to content

Commit 09c558a

Browse files
author
Janne Rönkkö
committed
Add support for downloading e2e Docker Compose bundle from GHA artifact
1 parent fb2929d commit 09c558a

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

github-actions/run-ci/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: "Run CI workflow"
22
description: "Setup the e2e environment and run cypress tests in it"
33
inputs:
4+
docker_compose_bundle_gha_artifact:
5+
description:
6+
Name of GitHub Actions artifact from which the Docker Compose bundle
7+
can be found. If not set, the bundle is downloaded from jore4-docker-compose-bundle
8+
Git repository's main branch.
9+
required: false
10+
default: null
411
ui_version:
512
description:
613
Version of ui to use (docker image tag). Set to "" if using the default
@@ -106,6 +113,7 @@ runs:
106113
- name: Start e2e env
107114
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v8
108115
with:
116+
docker_compose_bundle_gha_artifact: "${{ inputs.docker_compose_bundle_gha_artifact }}"
109117
ui_version: "${{ inputs.ui_version }}"
110118
cypress_version: "${{ inputs.cypress_version }}"
111119
hasura_version: "${{ inputs.hasura_version }}"

github-actions/setup-e2e-environment/action.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ description:
33
"Builds e2e environment with docker-compose and tests that services are
44
running."
55
inputs:
6+
docker_compose_bundle_gha_artifact:
7+
description:
8+
Name of GitHub Actions artifact from which the Docker Compose bundle
9+
can be found. If not set, the bundle is downloaded from jore4-docker-compose-bundle
10+
Git repository's main branch.
11+
required: false
12+
default: null
613
ui_version:
714
description:
815
Version of ui to use (docker image tag). Set to "" if using the default
@@ -95,9 +102,21 @@ inputs:
95102
runs:
96103
using: "composite"
97104
steps:
98-
- name: Download and extract e2e docker-compose release
105+
- name: Create directory for Docker Compose bundle
106+
shell: bash
99107
run: |
100108
mkdir -p ${{ github.workspace }}/docker
109+
110+
- name: Download docker-compose bundle from GHA artifact
111+
if: ${{ inputs.docker_compose_bundle_gha_artifact }}
112+
uses: actions/download-artifact@v4
113+
with:
114+
name: jore4-docker-compose-bundle
115+
path: ${{ github.workspace }}/docker
116+
117+
- name: Download e2e docker-compose bundle from jore4-docker-compose-bundle repository
118+
if: ${{ !inputs.docker_compose_bundle_gha_artifact }}
119+
run: |
101120
curl -s -L https://github.com/HSLdevcom/jore4-docker-compose-bundle/archive/refs/heads/main.tar.gz \
102121
| tar \
103122
-xz \

0 commit comments

Comments
 (0)