Skip to content

Commit 622183e

Browse files
author
Janne Rönkkö
committed
Add support for downloading e2e Docker Compose bundle from GHA artifact
1 parent 95114bb commit 622183e

2 files changed

Lines changed: 23 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: 15 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,7 +102,14 @@ inputs:
95102
runs:
96103
using: "composite"
97104
steps:
98-
- name: Download and extract e2e docker-compose release
105+
- name: Retrieve docker-compose bundle from GHA artifact
106+
if: ${{ inputs.docker_compose_bundle_gha_artifact }}
107+
uses: actions/download-artifact@v4
108+
with:
109+
name: jore4-docker-compose-bundle
110+
111+
- name: Retrieve e2e docker-compose bundle from jore4-docker-compose-bundle repository
112+
if: ${{ !inputs.docker_compose_bundle_gha_artifact }}
99113
run: |
100114
mkdir -p ${{ github.workspace }}/docker
101115
curl -s -L https://github.com/HSLdevcom/jore4-docker-compose-bundle/archive/refs/heads/main.tar.gz \

0 commit comments

Comments
 (0)