Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(docker-compose): test all versions and variations #50

Merged
merged 8 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 67 additions & 11 deletions .github/workflows/docker-compose-test-e2e-full-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,80 @@ jobs:
fail-fast: false
matrix:
versions:
- name: Camunda 8.3
# Camunda 8.3
- name: Camunda 8.3 ⭐
camunda-version: "8.3"
compose-args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
- name: Camunda 8.4
main-compose-args: "-f docker-compose.yaml"
e2e-test-enabled: false
- name: Camunda 8.3 - Identity Disabled
camunda-version: "8.3"
main-compose-args: "-f docker-compose-core.yaml"
e2e-test-enabled: false
- name: Camunda 8.3 - Web Modeler Standalone
camunda-version: "8.3"
deps-compose-args: "--profile identity"
main-compose-args: "-f docker-compose-web-modeler.yaml"
e2e-test-enabled: false
# Camunda 8.4
- name: Camunda 8.4 ⭐
camunda-version: "8.4"
main-compose-args: "-f docker-compose.yaml"
e2e-test-enabled: false
- name: Camunda 8.4 - Identity Disabled
camunda-version: "8.4"
compose-args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
- name: Camunda 8.5
main-compose-args: "-f docker-compose-core.yaml"
e2e-test-enabled: false
- name: Camunda 8.4 - Web Modeler Standalone
camunda-version: "8.4"
deps-compose-args: "--profile identity"
main-compose-args: "-f docker-compose-web-modeler.yaml"
e2e-test-enabled: false
# Camunda 8.5
- name: Camunda 8.5 ⭐
camunda-version: "8.5"
main-compose-args: "-f docker-compose.yaml"
e2e-test-enabled: false
- name: Camunda 8.5 - Identity Disabled
camunda-version: "8.5"
compose-args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
- name: Camunda 8.6
main-compose-args: "-f docker-compose-core.yaml"
e2e-test-enabled: false
- name: Camunda 8.5 - Web Modeler Standalone
camunda-version: "8.5"
deps-compose-args: "--profile identity"
main-compose-args: "-f docker-compose-web-modeler.yaml"
e2e-test-enabled: false
# Camunda 8.6
- name: Camunda 8.6 ⭐
camunda-version: "8.6"
e2e-test-enabled: true
- name: Camunda 8.6 - Identity Disabled
camunda-version: "8.6"
main-compose-args: "-f docker-compose-core.yaml"
e2e-test-enabled: false
- name: Camunda 8.6 - Web Modeler Standalone
camunda-version: "8.6"
compose-args: "--profile full"
- name: Camunda Alpha
deps-compose-args: "--profile identity"
main-compose-args: "-f docker-compose-web-modeler.yaml"
e2e-test-enabled: false
# Camunda Alpha
- name: Camunda Alpha ⭐
camunda-version: "alpha"
main-compose-args: "-f docker-compose.yaml"
e2e-test-enabled: true
- name: Camunda Alpha - Identity Disabled
camunda-version: "alpha"
main-compose-args: "-f docker-compose-core.yaml"
e2e-test-enabled: false
- name: Camunda Alpha - Web Modeler Standalone
camunda-version: "alpha"
compose-args: "--profile full"
deps-compose-args: "--profile identity"
main-compose-args: "-f docker-compose-web-modeler.yaml"
e2e-test-enabled: false
exclude: ${{ fromJson(needs.init.outputs.unchanged-versions) }}
uses: ./.github/workflows/docker-compose-test-e2e-template.yaml
secrets: inherit
with:
camunda-version: ${{ matrix.versions.camunda-version }}
compose-args: ${{ matrix.versions.compose-args }}
deps-compose-args: ${{ matrix.versions.deps-compose-args }}
main-compose-args: ${{ matrix.versions.main-compose-args }}
e2e-test-enabled: ${{ matrix.versions.e2e-test-enabled }}
36 changes: 26 additions & 10 deletions .github/workflows/docker-compose-test-e2e-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ on:
description: Camunda minor version in format x.y
required: true
type: string
compose-args:
deps-compose-args:
description: Arguments supplied to Docker Compose dependencies
type: string
main-compose-args:
description: Arguments supplied to Docker Compose
required: true
type: string
Expand All @@ -34,16 +37,26 @@ jobs:
name: Run
runs-on: ubuntu-latest
steps:
#
# Init.

- name: ℹ️ Print workflow inputs ℹ️
env:
GITHUB_CONTEXT: ${{ toJson(inputs) }}
run: |
echo "Workflow Inputs:"
echo "${GITHUB_CONTEXT}"
- name: ℹ️ Print Docker Compose version ℹ️
run: |
docker compose version
- name: disable and stop mono-xsp4.service
run: |
sudo systemctl stop mono-xsp4.service || true
sudo systemctl disable mono-xsp4.service || true
sudo killall mono || true
sudo killall xsp4 || true

- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker registries
run: |
# DockerHub registry.
Expand All @@ -56,12 +69,17 @@ jobs:
#
# Docker Compose.

- name: Bring up containers
- name: ⭐ Bring up containers dependencies
if: inputs.deps-compose-args
working-directory: ${{ env.COMPOSE_WORKING_DIRECTORY }}
run: |
docker compose ${{ inputs.compose-args }} \
docker compose ${{ inputs.deps-compose-args }} \
up --quiet-pull -d
- name: ⭐ Bring up containers
working-directory: ${{ env.COMPOSE_WORKING_DIRECTORY }}
run: |
docker compose ${{ inputs.main-compose-args }} \
up --quiet-pull -d

- name: Wait until all containers are healthy
timeout-minutes: 5
run: |
Expand All @@ -76,17 +94,15 @@ jobs:

- name: Install Playwright
uses: ./.github/actions/install-playwright
if: ${{ inputs.e2e-test-enabled }}
if: inputs.e2e-test-enabled
with:
working-directory: ${{ inputs.e2e-test-directory }}

- name: Run Playwright tests
if: ${{ inputs.e2e-test-enabled }}
if: inputs.e2e-test-enabled
id: test
working-directory: ${{ inputs.e2e-test-directory }}
run: |
npx playwright test ${{ inputs.e2e-test-args }}

- name: Upload Playwright reports
if: always() && steps.test.conclusion != 'skipped'
uses: actions/upload-artifact@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#
# Note: this file is using Mailpit to simulate a mail server

version: "2.4"

services:

modeler-db:
Expand All @@ -23,6 +21,9 @@ services:
POSTGRES_PASSWORD: modeler-db-password
networks:
- modeler
profiles:
- ''
- web-modeler-standalone

modeler-websockets:
container_name: modeler-websockets
Expand All @@ -42,6 +43,9 @@ services:
PUSHER_APP_SECRET: modeler-app-secret
networks:
- modeler
profiles:
- ''
- web-modeler-standalone

mailpit:
# If you want to use your own SMTP server, you can remove this container
Expand All @@ -57,6 +61,9 @@ services:
interval: 30s
networks:
- modeler
profiles:
- ''
- web-modeler-standalone

# Modeler containers
modeler-restapi:
Expand All @@ -68,8 +75,6 @@ services:
condition: service_healthy
mailpit:
condition: service_started
identity:
condition: service_healthy
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8091/health/readiness" ]
interval: 5s
Expand All @@ -96,8 +101,11 @@ services:
RESTAPI_MAIL_ENABLE_TLS: "false"
RESTAPI_MAIL_FROM_ADDRESS: "[email protected]"
networks:
- modeler
- camunda-platform
- modeler
- camunda-platform
profiles:
- ''
- web-modeler-standalone

modeler-webapp:
container_name: modeler-webapp
Expand Down Expand Up @@ -137,7 +145,10 @@ services:
networks:
- modeler
- camunda-platform
profiles:
- ''
- web-modeler-standalone

networks:
camunda-platform:
modeler:
modeler:
27 changes: 27 additions & 0 deletions docker-compose/versions/camunda-8.3/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ services:
depends_on:
- elasticsearch
- identity
profiles:
- ''
- orchestration

operate: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#operate
image: camunda/operate:${CAMUNDA_PLATFORM_VERSION}
Expand Down Expand Up @@ -83,6 +86,9 @@ services:
- zeebe
- identity
- elasticsearch
profiles:
- ''
- orchestration

tasklist: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#tasklist
image: camunda/tasklist:${CAMUNDA_PLATFORM_VERSION}
Expand Down Expand Up @@ -126,6 +132,9 @@ services:
condition: service_healthy
identity:
condition: service_healthy
profiles:
- ''
- orchestration

connectors: # https://docs.camunda.io/docs/components/integration-framework/connectors/out-of-the-box-connectors/available-connectors-overview/
image: camunda/connectors-bundle:${CAMUNDA_CONNECTORS_VERSION}
Expand Down Expand Up @@ -159,6 +168,9 @@ services:
- zeebe
- operate
- identity
profiles:
- ''
- orchestration

optimize: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#optimize
image: camunda/optimize:${CAMUNDA_OPTIMIZE_VERSION}
Expand Down Expand Up @@ -194,6 +206,9 @@ services:
depends_on:
- identity
- elasticsearch
profiles:
- ''
- orchestration

identity: # https://docs.camunda.io/docs/self-managed/platform-deployment/docker/#identity
container_name: identity
Expand Down Expand Up @@ -251,6 +266,9 @@ services:
depends_on:
keycloak:
condition: service_healthy
profiles:
- ''
- identity

postgres: # https://hub.docker.com/_/postgres
container_name: postgres
Expand All @@ -269,6 +287,9 @@ services:
- postgres:/var/lib/postgresql/data
networks:
- identity-network
profiles:
- ''
- identity

keycloak: # https://hub.docker.com/r/bitnami/keycloak
container_name: keycloak
Expand All @@ -295,6 +316,9 @@ services:
- identity-network
depends_on:
- postgres
profiles:
- ''
- identity

elasticsearch: # https://hub.docker.com/_/elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION}
Expand Down Expand Up @@ -323,6 +347,9 @@ services:
- elastic:/usr/share/elasticsearch/data
networks:
- camunda-platform
profiles:
- ''
- orchestration

kibana:
image: docker.elastic.co/kibana/kibana:${ELASTIC_VERSION}
Expand Down
Loading
Loading