From 5b6f2cfd289b2345339b91f05e827630791e6533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Tue, 16 Jun 2026 13:33:16 +0200 Subject: [PATCH 1/8] feat: create deploy-esb action --- .forgejo/workflows/tag-release.yml | 1 + esb-deploy/README.md | 30 +++++++++++++++ esb-deploy/action.yml | 60 ++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 esb-deploy/README.md create mode 100644 esb-deploy/action.yml diff --git a/.forgejo/workflows/tag-release.yml b/.forgejo/workflows/tag-release.yml index 79c61b0..f17834c 100644 --- a/.forgejo/workflows/tag-release.yml +++ b/.forgejo/workflows/tag-release.yml @@ -18,6 +18,7 @@ on: - aws-configure - cache - checkout + - deploy-esb - download-artifact - helm-deploy - i18n-sync diff --git a/esb-deploy/README.md b/esb-deploy/README.md new file mode 100644 index 0000000..1b761ac --- /dev/null +++ b/esb-deploy/README.md @@ -0,0 +1,30 @@ +# esb-deploy + +Deploy a service to an ESB docker host. + +## Inputs + +| Input | Required | Default | Description | +|-------|----------|---------|-------------| +| `docker-host` | Yes | - | esbdb3.schmalzgroup.net, esbdb4.schmalzgroup.net, esbdb2-stage.schmalzgroup.net| +| `java-version` | Yes | 25 | Same as default of the maven-build action | +| `maven-profile` | No | `test` | Maven profile to activate during deploy | +| `maven-settings` | **Yes** | — | Secret containing the `settings.xml` content used for repository authentication | +| `service-name` | Yes | — | Name of the service to deploy | + +## Usage + +```yaml +- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/esb-deploy@esb-deploy-v1 + with: + service-name: my-service + docker-host: esbdocker2-stage.schmalzgroup.net + java-version: 8 + maven-profile: test + maven-settings: ${{ secrets.MAVEN_SETTINGS }} +``` + +## Notes + +- The compose files are extracted from variables. They can be provided on the organization or repository level. +- The action uses the maven-build action to build the service. The pom.xml has to be in the root directory diff --git a/esb-deploy/action.yml b/esb-deploy/action.yml new file mode 100644 index 0000000..96a6593 --- /dev/null +++ b/esb-deploy/action.yml @@ -0,0 +1,60 @@ +name: Deploy ESB +description: Deploy a service to an ESB docker host. + +inputs: + docker-host: + description: Docker host to deploy to + required: true + maven-profile: + required: false + default: 'test' + description: 'Maven profile to use for the build' + maven-settings: + description: Secret containing the settings.xml content used for repository authentication + required: true + java-version: + description: Java version to use for the build + required: true + service: + description: Name of the service to deploy + required: false + default: 'true' + +runs: + using: composite + steps: + - name: Create compose files + shell: bash + env: + BASE_COMPOSE: ${{ vars.DOCKER_COMPOSE }} + SU_COMPOSE: ${{ vars.DOCKER_COMPOSE_SU }} + run: | + printf '%s\n' "$BASE_COMPOSE" > compose.yml + printf '%s\n' "$SU_COMPOSE" > compose-su.yml + + - uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/maven-build@maven-build-v1 + with: + phase: verify + maven-settings: ${{ inputs.maven-settings }} + verify-goals: clean package + java-version: ${{ inputs.java-version }} + + - name: Compose stage + if: ${{ inputs.stage == 'true' }} + shell: bash + env: + SERVICE: ${{ inputs.service }} + run: | + echo "Deploying $SERVICE to stage environment" + export DOCKER_HOST="tcp://${{ inputs.docker-host }}:2375" + docker compose -f compose.yml -f compose-su.yml up -d --build --no-deps "$SERVICE" + + - name: Compose prod + if: ${{ inputs.stage != 'true' }} + shell: bash + env: + SERVICE: ${{ inputs.service }} + run: | + echo "Deploying $SERVICE to production environment" + export DOCKER_HOST="tcp://${{ inputs.docker-host }}:2375" + docker compose -f compose.yml up -d --build --no-deps "$SERVICE" From 4e15383d233328604bbd4c37d9dc737d9784e165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Tue, 16 Jun 2026 16:25:43 +0200 Subject: [PATCH 2/8] fix: use correct name in tag-release workflow --- .forgejo/workflows/tag-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/tag-release.yml b/.forgejo/workflows/tag-release.yml index f17834c..428ec72 100644 --- a/.forgejo/workflows/tag-release.yml +++ b/.forgejo/workflows/tag-release.yml @@ -18,8 +18,8 @@ on: - aws-configure - cache - checkout - - deploy-esb - download-artifact + - esb-deploy - helm-deploy - i18n-sync - inject-content From 115300a7e1614eaee4fc5d40ac7baf6e151ce73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Tue, 16 Jun 2026 16:32:34 +0200 Subject: [PATCH 3/8] fix: readme mentioned wrong parameters --- esb-deploy/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esb-deploy/README.md b/esb-deploy/README.md index 1b761ac..51eae81 100644 --- a/esb-deploy/README.md +++ b/esb-deploy/README.md @@ -10,14 +10,14 @@ Deploy a service to an ESB docker host. | `java-version` | Yes | 25 | Same as default of the maven-build action | | `maven-profile` | No | `test` | Maven profile to activate during deploy | | `maven-settings` | **Yes** | — | Secret containing the `settings.xml` content used for repository authentication | -| `service-name` | Yes | — | Name of the service to deploy | +| `service` | Yes | — | Name of the service to deploy | ## Usage ```yaml - uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/esb-deploy@esb-deploy-v1 with: - service-name: my-service + service: my-service docker-host: esbdocker2-stage.schmalzgroup.net java-version: 8 maven-profile: test From 0134da8ac7cab452a944bfd3abe25487739952cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Wed, 17 Jun 2026 07:42:35 +0200 Subject: [PATCH 4/8] fix: propagate maven profile in esb-deploy action --- esb-deploy/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/esb-deploy/action.yml b/esb-deploy/action.yml index 96a6593..c8fd97f 100644 --- a/esb-deploy/action.yml +++ b/esb-deploy/action.yml @@ -38,6 +38,7 @@ runs: maven-settings: ${{ inputs.maven-settings }} verify-goals: clean package java-version: ${{ inputs.java-version }} + maven-profile: ${{ inputs.maven-profile}} - name: Compose stage if: ${{ inputs.stage == 'true' }} From 91494155758370e2731738b33ed27543e9113989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Wed, 17 Jun 2026 08:01:38 +0200 Subject: [PATCH 5/8] fix: action did not provide stage toggle --- esb-deploy/README.md | 2 ++ esb-deploy/action.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/esb-deploy/README.md b/esb-deploy/README.md index 51eae81..ae02466 100644 --- a/esb-deploy/README.md +++ b/esb-deploy/README.md @@ -11,6 +11,7 @@ Deploy a service to an ESB docker host. | `maven-profile` | No | `test` | Maven profile to activate during deploy | | `maven-settings` | **Yes** | — | Secret containing the `settings.xml` content used for repository authentication | | `service` | Yes | — | Name of the service to deploy | +| `stage` | No | true | If true this is a stage deployment | ## Usage @@ -22,6 +23,7 @@ Deploy a service to an ESB docker host. java-version: 8 maven-profile: test maven-settings: ${{ secrets.MAVEN_SETTINGS }} + stage: true ``` ## Notes diff --git a/esb-deploy/action.yml b/esb-deploy/action.yml index c8fd97f..584274e 100644 --- a/esb-deploy/action.yml +++ b/esb-deploy/action.yml @@ -17,6 +17,9 @@ inputs: required: true service: description: Name of the service to deploy + required: true + stage: + description: Whether to deploy to stage environment (true) or production environment (false) required: false default: 'true' From a49611f28806801b87e0d31dd13ab949b5fae7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Wed, 17 Jun 2026 08:52:37 +0200 Subject: [PATCH 6/8] fix: maven action did not set profile in verify mode --- maven-build/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/maven-build/action.yml b/maven-build/action.yml index 961bc28..1c9b161 100644 --- a/maven-build/action.yml +++ b/maven-build/action.yml @@ -97,6 +97,7 @@ runs: run: | mvn --batch-mode $VERIFY_GOALS \ -s /tmp/maven-settings.xml \ + -P "$MAVEN_PROFILE" \ $EXTRA_ARGS - name: Deploy From 9783972537edc63ff438168f5c4348148512b4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hringer?= Date: Wed, 17 Jun 2026 09:41:57 +0200 Subject: [PATCH 7/8] fix: actually provide maven profile --- maven-build/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/maven-build/action.yml b/maven-build/action.yml index 1c9b161..6b16ded 100644 --- a/maven-build/action.yml +++ b/maven-build/action.yml @@ -94,6 +94,7 @@ runs: env: VERIFY_GOALS: ${{ inputs.verify-goals }} EXTRA_ARGS: ${{ inputs.extra-args }} + MAVEN_PROFILE: ${{ inputs.maven-profile }} run: | mvn --batch-mode $VERIFY_GOALS \ -s /tmp/maven-settings.xml \ From 298cf5c375786e42944ac90487b6160402ce6771 Mon Sep 17 00:00:00 2001 From: DMI Date: Wed, 24 Jun 2026 10:01:11 +0000 Subject: [PATCH 8/8] feat: add `no-deps` and `projects` inputs to `playwright-run` action and adjust readme to include a basic and a sharded example --- playwright-run/README.md | 35 ++++++++++++++++++++++++++++++++--- playwright-run/action.yml | 23 ++++++++++++++++++++++- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/playwright-run/README.md b/playwright-run/README.md index 825b354..570a9ac 100644 --- a/playwright-run/README.md +++ b/playwright-run/README.md @@ -12,18 +12,47 @@ Run Playwright E2E tests for one shard and upload the blob report as an artifact | `jfrog-token` | No | `""` | JFrog npm auth token | | `shard-index` | No | `1` | Current shard index (1-based). Set to `1` when not sharding. | | `shard-total` | No | `1` | Total number of shards. Set to `1` to disable sharding. | +| `no-deps` | No | `false` | Skip dependencies between Playwright projects (e.g. setup/teardown). Passes `--no-deps` to Playwright. | +| `projects` | No | `""` | Comma-separated list of Playwright projects to run (e.g. `chromium,firefox,Mobile Chrome`). Leave empty to use the Playwright default. | | `artifact-retention-days` | No | `3` | Number of days to retain the blob report artifact | ## Usage +### Basic + ```yaml - uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/playwright-run@playwright-run-v1 with: - working-directory: frontend + working-directory: e2e node-version: 22 jfrog-token: ${{ secrets.JFROG_TOKEN }} - shard-index: ${{ matrix.shard-index }} - shard-total: 5 +``` + +### Sharded + +```yaml +jobs: + test: + name: "Test Shard ${{ matrix.shard-index }}/${{ matrix.total }}" + # Define the matrix strategy on the parent job: + strategy: + fail-fast: false + matrix: + total: [5] # The same for all instances + shard-index: [1, 2, 3, 4, 5] + steps: + # ...other steps like checkout repo etc. + - name: Run tests + uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/playwright-run@playwright-run-v1 + with: + working-directory: frontend + node-version: 22 + jfrog-token: ${{ secrets.JFROG_TOKEN }} + # Matrix data is passed here: + shard-index: ${{ matrix.shard-index }} + shard-total: ${{ matrix.total }} + no-deps: "true" + projects: "chromium,firefox,webkit,Mobile Chrome,Mobile Safari" ``` ## Notes diff --git a/playwright-run/action.yml b/playwright-run/action.yml index b07b29b..f521fdd 100644 --- a/playwright-run/action.yml +++ b/playwright-run/action.yml @@ -29,6 +29,14 @@ inputs: description: Total number of shards. Set to 1 to disable sharding. required: false default: "1" + no-deps: + description: Whether to ignore dependencies between Playwright projects (e.g. setup, teardown) + required: false + default: false + projects: + description: Comma-separated list of Playwright projects to include, leave empty to use the Playwright default + required: false + default: "" artifact-retention-days: description: Number of days to retain the blob report artifact required: false @@ -70,12 +78,25 @@ runs: WORKING_DIR: ${{ inputs.working-directory }} SHARD_INDEX: ${{ inputs.shard-index }} SHARD_TOTAL: ${{ inputs.shard-total }} + NO_DEPS: ${{ inputs.no-deps }} + PROJECTS: ${{ inputs.projects }} run: | SHARD_ARG="" if [ "${SHARD_TOTAL}" != "1" ]; then SHARD_ARG="--shard=${SHARD_INDEX}/${SHARD_TOTAL}" fi - pnpm --prefix="${WORKING_DIR}" exec playwright test ${SHARD_ARG} --reporter=blob,dot + NO_DEPS_ARG="" + if [ "${NO_DEPS}" == "true" ]; then + NO_DEPS_ARG="--no-deps" + fi + PROJECTS_ARG=() + if [ -n "${PROJECTS}" ]; then + IFS=',' read -ra PROJECT_LIST <<< "${PROJECTS}" + for project in "${PROJECT_LIST[@]}"; do + PROJECTS_ARG+=("--project=${project}") + done + fi + pnpm --prefix="${WORKING_DIR}" exec playwright test ${SHARD_ARG} ${NO_DEPS_ARG} "${PROJECTS_ARG[@]}" --reporter=blob,dot - name: Upload blob report if: ${{ !cancelled() }}