From ff7f677a0ab9d280893a03fee3507e19c5055693 Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Tue, 6 Dec 2022 15:39:21 +0100 Subject: [PATCH 01/34] feat(docker): update ubuntu version related to camunda/camunda-bpm-platform#2989 --- .github/workflows/build-and-test-ee.yml | 4 ++-- .github/workflows/build-test-and-publish-ce.yml | 4 ++-- test/test_helper.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-test-ee.yml b/.github/workflows/build-and-test-ee.yml index 08102bf6..90467b50 100644 --- a/.github/workflows/build-and-test-ee.yml +++ b/.github/workflows/build-and-test-ee.yml @@ -3,12 +3,12 @@ on: [pull_request, workflow_dispatch] jobs: build-and-test-ee: if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: DISTRO: [tomcat, wildfly, run] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Execute pipeline run: ./pipeline.sh env: diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index d8b12dc0..fc4c7af1 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -2,12 +2,12 @@ name: Build, test, and publish CE on: [pull_request, push, workflow_dispatch] jobs: build-and-test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: DISTRO: [tomcat, wildfly, run] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Execute pipeline run: ./pipeline.sh env: diff --git a/test/test_helper.sh b/test/test_helper.sh index c56cc704..bdeee782 100644 --- a/test/test_helper.sh +++ b/test/test_helper.sh @@ -57,9 +57,9 @@ function create_user { function test_login { logger "Attempting login to http://localhost:8080/camunda/api/admin/auth/user/default/login/${1}" rm -f dumped-headers.txt - curl --dump-header dumped-headers.txt --fail -s -o/dev/null http://localhost:8080/camunda/app/${1}/default/ + curl --dump-header dumped-headers.txt --fail -s -o/dev/null http://127.0.0.1:8080/camunda/app/${1}/default/ # dumped-headers.txt uses windows line endings, drop them - curl --cookie dumped-headers.txt -H "$(cat dumped-headers.txt | grep X-XSRF-TOKEN | tr -d '\r\n')" -H "Accept: application/json" --fail -s --data 'username=demo&password=demo' -o/dev/null http://localhost:8080/camunda/api/admin/auth/user/default/login/${1} + curl --cookie dumped-headers.txt -H "$(cat dumped-headers.txt | grep X-XSRF-TOKEN | tr -d '\r\n')" -H "Accept: application/json" --fail -s --data 'username=demo&password=demo' -o/dev/null http://127.0.0.1:8080/camunda/api/admin/auth/user/default/login/${1} } function test_encoding { From e55c4eb2e394e5bd35a50b618086e2d8f30f93b3 Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Tue, 10 Jan 2023 11:19:09 +0100 Subject: [PATCH 02/34] feat(docker): add arm64 build related to camunda/camunda-bpm-platform#2668 --- .github/workflows/build-and-test-ee.yml | 21 ++++++- .../workflows/build-test-and-publish-ce.yml | 61 +++++++++++++++++-- pipeline.sh | 17 ++++-- release.sh | 46 +++++++++----- test/docker-compose.yml | 20 +++--- test/test_helper.sh | 2 +- 6 files changed, 134 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-and-test-ee.yml b/.github/workflows/build-and-test-ee.yml index 90467b50..f9146947 100644 --- a/.github/workflows/build-and-test-ee.yml +++ b/.github/workflows/build-and-test-ee.yml @@ -7,12 +7,29 @@ jobs: strategy: matrix: DISTRO: [tomcat, wildfly, run] + PLATFORM: [amd64, arm64] steps: - - uses: actions/checkout@v3 - - name: Execute pipeline + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + if: ${{ matrix.PLATFORM != 'amd64' }} + with: + platforms: ${{ matrix.PLATFORM }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build run: ./pipeline.sh env: DISTRO: ${{ matrix.DISTRO }} EE: true + PLATFORM: ${{ matrix.PLATFORM }} NEXUS_PASS: ${{ secrets.NEXUS_PASS }} NEXUS_USER: ${{ secrets.NEXUS_USER }} + - name: Test + run: ./test.sh + working-directory: test + env: + DISTRO: ${{ matrix.DISTRO }} + EE: true + PLATFORM: ${{ matrix.PLATFORM }} diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index fc4c7af1..36161cc4 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -6,18 +6,71 @@ jobs: strategy: matrix: DISTRO: [tomcat, wildfly, run] + PLATFORM: [amd64, arm64] steps: - - uses: actions/checkout@v3 - - name: Execute pipeline + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + if: ${{ matrix.PLATFORM != 'amd64' }} + with: + platforms: ${{ matrix.PLATFORM }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Expose GitHub Runtime + uses: actions/github-script@v6 + with: + script: | + Object.keys(process.env).forEach(function (key) { + if (key.startsWith('ACTIONS_')) { + core.info(`${key}=${process.env[key]}`); + core.exportVariable(key, process.env[key]); + } + }); + - name: Build run: ./pipeline.sh env: DISTRO: ${{ matrix.DISTRO }} EE: false - - name: Publish image - if: ${{ github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/heads/7.') }} + PLATFORM: ${{ matrix.PLATFORM }} + - name: Test + run: ./test.sh + working-directory: test + env: + DISTRO: ${{ matrix.DISTRO }} + EE: false + PLATFORM: ${{ matrix.PLATFORM }} + publish: + runs-on: ubuntu-20.04 + needs: build-and-test + if: ${{ github.ref == 'refs/heads/next' || startsWith(github.ref, 'refs/heads/7.') }} + strategy: + matrix: + DISTRO: [tomcat, wildfly, run] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64,amd64 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Expose GitHub Runtime + uses: actions/github-script@v6 + with: + script: | + Object.keys(process.env).forEach(function (key) { + if (key.startsWith('ACTIONS_')) { + core.info(`${key}=${process.env[key]}`); + core.exportVariable(key, process.env[key]); + } + }); + - name: Publish multi-platform images run: ./release.sh env: DISTRO: ${{ matrix.DISTRO }} EE: false + PLATFORMS: linux/arm64,linux/amd64 DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} diff --git a/pipeline.sh b/pipeline.sh index 06cc6879..3c628612 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -1,10 +1,17 @@ #!/bin/bash - -docker build . \ - -t camunda/camunda-bpm-platform:${DISTRO} \ + +EE=${EE:-false} +IMAGE_NAME=camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + +docker buildx build . \ + -t "${IMAGE_NAME}" \ + --platform linux/${PLATFORM} \ --build-arg DISTRO=${DISTRO} \ --build-arg EE=${EE} \ --build-arg USER=${NEXUS_USER} \ - --build-arg PASSWORD=${NEXUS_PASS} + --build-arg PASSWORD=${NEXUS_PASS} \ + --cache-to type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ + --cache-from type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ + --load -./test/test.sh +docker inspect "${IMAGE_NAME}" | grep "Architecture" -A2 diff --git a/release.sh b/release.sh index 586e668b..915cb646 100755 --- a/release.sh +++ b/release.sh @@ -4,13 +4,27 @@ EE=${EE:-false} VERSION=${VERSION:-$(grep VERSION= Dockerfile | head -n1 | cut -d = -f 2)} DISTRO=${DISTRO:-$(grep DISTRO= Dockerfile | cut -d = -f 2)} SNAPSHOT=${SNAPSHOT:-$(grep SNAPSHOT= Dockerfile | cut -d = -f 2)} +PLATFORMS=${PLATFORMS:-linux/amd64} +NEXUS_USER=${NEXUS_USER:-} +NEXUS_PASS=${NEXUS_PASS:-} IMAGE=camunda/camunda-bpm-platform -function tag_and_push { - local tag=${1} - docker tag ${IMAGE}:${DISTRO} ${IMAGE}:${tag} - docker push ${IMAGE}:${tag} +function build_and_push { + local tags=("$@") + printf -v tag_arguments -- "--tag $IMAGE:%s " "${tags[@]}" + docker buildx build . \ + $tag_arguments \ + --build-arg DISTRO=${DISTRO} \ + --build-arg EE=${EE} \ + --build-arg USER=${NEXUS_USER} \ + --build-arg PASSWORD=${NEXUS_PASS} \ + --cache-from type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ + --platform $PLATFORMS \ + --push + + echo "Tags released:" >> $GITHUB_STEP_SUMMARY + printf -- "- $IMAGE:%s\n" "${tags[@]}" >> $GITHUB_STEP_SUMMARY } if [ "${EE}" = "true" ]; then @@ -26,31 +40,35 @@ fi docker login -u "${DOCKER_HUB_USERNAME}" -p "${DOCKER_HUB_PASSWORD}" +tags=() + if [ "${SNAPSHOT}" = "true" ]; then - tag_and_push "${DISTRO}-${VERSION}-SNAPSHOT" - tag_and_push "${DISTRO}-SNAPSHOT" + tags+=("${DISTRO}-${VERSION}-SNAPSHOT") + tags+=("${DISTRO}-SNAPSHOT") if [ "${DISTRO}" = "tomcat" ]; then - tag_and_push "${VERSION}-SNAPSHOT" - tag_and_push "SNAPSHOT" + tags+=("${VERSION}-SNAPSHOT") + tags+=("SNAPSHOT") fi else - tag_and_push "${DISTRO}-${VERSION}" + tags+=("${DISTRO}-${VERSION}") if [ "${DISTRO}" = "tomcat" ]; then - tag_and_push "${VERSION}" + tags+=("${VERSION}") fi fi # Latest Docker image is created and pushed just once when a new version is relased. # Latest tag refers to the latest minor release of Camunda Platform. # https://github.com/camunda/docker-camunda-bpm-platform/blob/next/README.md#supported-tagsreleases -# The 1st condition matches only when the version branch is the same as the main branch. +# The 1st condition matches only when the version branch is the same as the main branch. git fetch origin next if [ $(git rev-parse HEAD) = $(git rev-parse FETCH_HEAD) ] && [ "${SNAPSHOT}" = "false" ]; then # tagging image as latest - tag_and_push "${DISTRO}-latest" - tag_and_push "${DISTRO}" + tags+=("${DISTRO}-latest") + tags+=("${DISTRO}") if [ "${DISTRO}" = "tomcat" ]; then - tag_and_push "latest" + tags+=("latest") fi fi + +build_and_push "${tags[@]}" diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 082e4899..61c09ed8 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,14 +1,16 @@ -version: '3' +version: '2.4' services: camunda: - image: camunda/camunda-bpm-platform:${DISTRO:-latest} + image: camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + platform: linux/${PLATFORM} ports: - "8080:8080" restart: unless-stopped camunda-mysql: - image: camunda/camunda-bpm-platform:${DISTRO:-latest} + image: camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + platform: linux/${PLATFORM} environment: - DB_DRIVER=com.mysql.cj.jdbc.Driver - DB_URL=jdbc:mysql://mysql:3306/process-engine?sendFractionalSeconds=false @@ -22,7 +24,8 @@ services: restart: unless-stopped camunda-postgres: - image: camunda/camunda-bpm-platform:${DISTRO:-latest} + image: camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + platform: linux/${PLATFORM} environment: - DB_DRIVER=org.postgresql.Driver - DB_URL=jdbc:postgresql://postgres:5432/camunda @@ -36,7 +39,8 @@ services: restart: unless-stopped camunda-debug: - image: camunda/camunda-bpm-platform:${DISTRO:-latest} + image: camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + platform: linux/${PLATFORM} environment: - DEBUG=true ports: @@ -45,7 +49,8 @@ services: restart: unless-stopped camunda-prometheus-jmx: - image: camunda/camunda-bpm-platform:${DISTRO:-latest} + image: camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + platform: linux/${PLATFORM} environment: - JMX_PROMETHEUS=true ports: @@ -54,7 +59,8 @@ services: restart: unless-stopped camunda-password-file: - image: camunda/camunda-bpm-platform:${DISTRO:-latest} + image: camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} + platform: linux/${PLATFORM} environment: - DB_DRIVER=com.mysql.cj.jdbc.Driver - DB_URL=jdbc:mysql://mysql:3306/process-engine?sendFractionalSeconds=false diff --git a/test/test_helper.sh b/test/test_helper.sh index bdeee782..62b0f354 100644 --- a/test/test_helper.sh +++ b/test/test_helper.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -RETRIES=20 +RETRIES=80 WAIT=5 function _log { >&2 echo $@ From 07f30a85729ee59abd8da8ce643f0fe823841a6a Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Wed, 11 Jan 2023 13:24:41 +0100 Subject: [PATCH 03/34] feat(docker): increase test retries related to camunda/camunda-bpm-platform#2668 --- test/test_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_helper.sh b/test/test_helper.sh index 62b0f354..75d938ab 100644 --- a/test/test_helper.sh +++ b/test/test_helper.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -RETRIES=80 +RETRIES=100 WAIT=5 function _log { >&2 echo $@ From 536dc060c4d1c3225ad748a1d2b53cef927b6110 Mon Sep 17 00:00:00 2001 From: chaima-mnsr <25367434+chaima-mnsr@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:09:55 +0100 Subject: [PATCH 04/34] Adjust maven config to use CI Nexus as a cache mechanism for Artifactory related to https://github.com/camunda/team-infrastructure/issues/310 --- .github/workflows/build-test-and-publish-ce.yml | 2 ++ settings.xml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index 36161cc4..fc84518b 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -33,6 +33,8 @@ jobs: DISTRO: ${{ matrix.DISTRO }} EE: false PLATFORM: ${{ matrix.PLATFORM }} + NEXUS_PASS: ${{ secrets.NEXUS_PASS }} + NEXUS_USER: ${{ secrets.NEXUS_USER }} - name: Test run: ./test.sh working-directory: test diff --git a/settings.xml b/settings.xml index 3124e7d6..604fb49e 100644 --- a/settings.xml +++ b/settings.xml @@ -10,4 +10,12 @@ ${env.PASSWORD} + + + camunda-nexus + camunda-nexus + Camunda Nexus + https://repository.nexus.camunda.cloud/content/groups/internal/ + + From b12585c2e895813e5ea0499687e1c351f531d907 Mon Sep 17 00:00:00 2001 From: Nathan Hinkle <111273832+nwhinkle@users.noreply.github.com> Date: Fri, 10 Feb 2023 11:57:45 +0100 Subject: [PATCH 05/34] fix(nexus): adding proper nexus secrets for publish stage Related to camunda/team-infrastructure#310 --- .github/workflows/build-test-and-publish-ce.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index fc84518b..5f03a1cf 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -76,3 +76,5 @@ jobs: PLATFORMS: linux/arm64,linux/amd64 DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} + NEXUS_PASS: ${{ secrets.NEXUS_PASS }} + NEXUS_USER: ${{ secrets.NEXUS_USER }} From 60c29a86d16decdbddb7a9bb0801bc38ab6a5ca4 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Wed, 22 Feb 2023 11:45:50 +0100 Subject: [PATCH 06/34] chore(deps): bump db versions to latest supported Related to camunda/camunda-bpm-platform#2780 --- test/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 61c09ed8..91fd8585 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -76,7 +76,7 @@ services: restart: unless-stopped mysql: - image: mysql:5.7 + image: mysql:8.0 environment: - MYSQL_ROOT_PASSWORD=camunda - MYSQL_USER=camunda @@ -84,7 +84,7 @@ services: - MYSQL_DATABASE=process-engine postgres: - image: postgres:9.6 + image: postgres:15 environment: - POSTGRES_USER=camunda - POSTGRES_PASSWORD=camunda From ec021b06ba014cf3ba9e85d69e3f0fe50f35a179 Mon Sep 17 00:00:00 2001 From: Yana Vasileva Date: Thu, 23 Feb 2023 09:22:15 +0100 Subject: [PATCH 07/34] chore(download): adjust mysql jdbc driver Related to camunda/camunda-bpm-platform#2780 --- download.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/download.sh b/download.sh index b75307a0..812622e5 100755 --- a/download.sh +++ b/download.sh @@ -87,7 +87,7 @@ POSTGRESQL_VERSION=$(xmlstarlet sel -t -v //_:version.postgresql $cambpmdbsettin mvn dependency:copy -B \ $PROXY \ - -Dartifact="mysql:mysql-connector-java:${MYSQL_VERSION}:jar" \ + -Dartifact="com.mysql:mysql-connector-j:${MYSQL_VERSION}:jar" \ -DoutputDirectory=/tmp/ mvn dependency:copy -B \ $PROXY \ @@ -100,8 +100,8 @@ case ${DISTRO} in batch embed-server --std-out=echo -module add --name=mysql.mysql-connector-java --slot=main --resources=/tmp/mysql-connector-java-${MYSQL_VERSION}.jar --dependencies=javax.api,javax.transaction.api -/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="mysql.mysql-connector-java",driver-xa-datasource-class-name=com.mysql.cj.jdbc.MysqlXADataSource) +module add --name=com.mysql.mysql-connector-j --slot=main --resources=/tmp/mysql-connector-j-${MYSQL_VERSION}.jar --dependencies=javax.api,javax.transaction.api +/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql.mysql-connector-j",driver-xa-datasource-class-name=com.mysql.cj.jdbc.MysqlXADataSource) module add --name=org.postgresql.postgresql --slot=main --resources=/tmp/postgresql-${POSTGRESQL_VERSION}.jar --dependencies=javax.api,javax.transaction.api /subsystem=datasources/jdbc-driver=postgresql:add(driver-name="postgresql",driver-module-name="org.postgresql.postgresql",driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource) @@ -112,11 +112,11 @@ EOF rm -rf /camunda/standalone/configuration/standalone_xml_history/current/* ;; run*) - cp /tmp/mysql-connector-java-${MYSQL_VERSION}.jar /camunda/configuration/userlib + cp /tmp/mysql-connector-j-${MYSQL_VERSION}.jar /camunda/configuration/userlib cp /tmp/postgresql-${POSTGRESQL_VERSION}.jar /camunda/configuration/userlib ;; tomcat*) - cp /tmp/mysql-connector-java-${MYSQL_VERSION}.jar /camunda/lib + cp /tmp/mysql-connector-j-${MYSQL_VERSION}.jar /camunda/lib cp /tmp/postgresql-${POSTGRESQL_VERSION}.jar /camunda/lib # remove default CATALINA_OPTS from environment settings echo "" > /camunda/bin/setenv.sh From 3eddd680eab93bf8cf6afd2c4361b87dd06b3801 Mon Sep 17 00:00:00 2001 From: Tobias Metzke-Bernstein Date: Mon, 20 Mar 2023 16:24:29 +0100 Subject: [PATCH 08/34] chore(ci): continue parallel builds on failure --- .github/workflows/build-test-and-publish-ce.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index 5f03a1cf..266287b4 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -4,6 +4,7 @@ jobs: build-and-test: runs-on: ubuntu-22.04 strategy: + fail-fast: false matrix: DISTRO: [tomcat, wildfly, run] PLATFORM: [amd64, arm64] From d41faa78eb3fef9d49dffd1a55453cd8c1ba8e71 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Mon, 27 Mar 2023 11:02:34 +0200 Subject: [PATCH 09/34] chore(test): rename wildfly invoice application (#262) https://github.com/camunda/camunda-bpm-platform/issues/3259 --- test/test-wildfly.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-wildfly.sh b/test/test-wildfly.sh index 46b6b388..2df7a47f 100755 --- a/test/test-wildfly.sh +++ b/test/test-wildfly.sh @@ -10,7 +10,7 @@ poll_log 'started in' 'started (with errors) in' || _exit 1 "Server not started" _log "Server started" -grep_log 'Deployed "camunda-example-invoice-7.' || _exit 2 "Process application not deployed" +grep_log 'Deployed "camunda-example-invoice-jakarta-7.' || _exit 2 "Process application not deployed" _log "Process application deployed" From b638683a57b79766804aa45ac5148d2243739302 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Tue, 4 Apr 2023 14:29:32 +0200 Subject: [PATCH 10/34] chore(project): bump next to 7.20 (#263) camunda/camunda-bpm-platform#2936 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce84e5f8..4c6148f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.15 as builder -ARG VERSION=7.19.0 +ARG VERSION=7.20.0 ARG DISTRO=tomcat ARG SNAPSHOT=true @@ -32,7 +32,7 @@ RUN /tmp/download.sh FROM alpine:3.15 -ARG VERSION=7.19.0 +ARG VERSION=7.20.0 ENV CAMUNDA_VERSION=${VERSION} ENV DB_DRIVER= From c0a1489fae0a8041454a978eb4665568284a12a4 Mon Sep 17 00:00:00 2001 From: Miklas Boskamp <20189772+mboskamp@users.noreply.github.com> Date: Tue, 25 Apr 2023 07:07:57 +0200 Subject: [PATCH 11/34] chore(readme): document how to build the CE image Related to camunda/camunda-bpm-platform/issues/3269 Co-authored-by: yanavasileva --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ab595d82..cc52f57c 100644 --- a/README.md +++ b/README.md @@ -305,8 +305,11 @@ docker run -d --name camunda -p 8080:8080 \ ## Build -You can use the image to build a Docker image for a given Camunda Platform -version and distribution. +You can build a Docker image for a given Camunda Platform version and distribution yourself. +If you want to build the community edition (CE), make sure to adjust the +[settings.xml](settings.xml) +and remove the `camunda-nexus` mirror. +If you want to build the enterprise edition (EE), check out [the dedicated README section](#build-an-enterprise-version). ### Build a released version @@ -341,8 +344,8 @@ docker build -t camunda-bpm-platform \ ### Build an enterprise version -If you are a Camunda enterprise customer, you can use this image to build -an enterprise version of the Docker image. Therefore, set the `VERSION` +If you are a Camunda enterprise customer, you can build +an enterprise version of the Docker image. Set the `VERSION` build argument to the Camunda version without the ee suffix, i.e. `7.16.1`, set the `EE` build argument to `true` and the `USER` and `PASSWORD` build argument to your enterprise credentials. From 89fb8716bdabc6edba959df15a56ead28660b4c0 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Thu, 15 Jun 2023 14:52:14 +0200 Subject: [PATCH 12/34] chore(dockerfile): bump to JDK 17 required by Camunda Run camunda/camunda-bpm-platform#3434 --- Dockerfile | 2 +- README.md | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c6148f8..a7037613 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ RUN apk add --no-cache \ bash \ ca-certificates \ curl \ - openjdk11-jre-headless \ + openjdk17-jre-headless \ tzdata \ tini \ xmlstarlet \ diff --git a/README.md b/README.md index cc52f57c..86182628 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Camunda Platform Docker images -> :information_source: We will soon disable the GitHub issues on this repository. -> In the future, use our [JIRA issue tracker](https://jira.camunda.com/projects/CAM/issues/CAM-2099?filter=allopenissues) for bug reports or feature requests. +> Use our [GitHub issue tracker](https://github.com/camunda/camunda-bpm-platform/issues) for bug reports or feature requests. > For help requests, open a help request topic on the [Camunda forum](https://forum.camunda.org/) or [a help request support ticket](https://docs.camunda.org/enterprise/support/#how-to-create-a-support-issue) if you are an enterprise customer. This Camunda project provides docker images of the latest @@ -144,11 +143,14 @@ disables Swagger UI by default. Our docker images are using the latest LTS OpenJDK version supported by Camunda Platform. This currently means: - - Camunda 7.12 or later will be based on OpenJDK 11. + - Camunda 7.20 or later will be based on OpenJDK 17. + - Camunda 7.20 image for Camunda Run is supported only for JDK 17. + - Camunda 7.12 - 7.19 is based on OpenJDK 11. + - Camunda 7.19 image for WildFly is supported only for JDK 11 and JDK 17. - All previous versions are based on OpenJDK 8. -While all the OpenJDK versions supported by Camunda will work, we will not -provide a ready to use image for them. +While all the OpenJDK versions supported by Camunda will work with the exceptions specified above, +we will not provide ready to use images for them. #### Java options @@ -158,7 +160,7 @@ be set. ### Use docker memory limits Instead of specifying the Java memory settings it is also possible to instruct -the JVM to respect the docker memory settings. As the image uses Java 11 it does +the JVM to respect the docker memory settings. As the image uses Java 17 it does not have to be enabled explicitly using the `JAVA_OPTS` environment variable. If you want to set the memory limits manually you can restore the pre-Java-11-behavior by setting the following environment variable. From 9ad3835f2bf93504c7746b51b088b7873f30c774 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Fri, 16 Jun 2023 12:20:19 +0200 Subject: [PATCH 13/34] Update build-test-and-publish-ce.yml --- .github/workflows/build-test-and-publish-ce.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index 266287b4..62aa4b98 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -29,7 +29,11 @@ jobs: } }); - name: Build - run: ./pipeline.sh + uses: nick-fields/retry@v2 + with: + timeout_seconds: 300 # seconds + max_attempts: 2 + command: ./pipeline.sh env: DISTRO: ${{ matrix.DISTRO }} EE: false From 6583c7b824b03514156796a8eb312a299e8a6de3 Mon Sep 17 00:00:00 2001 From: Yana Vasileva Date: Fri, 16 Jun 2023 12:21:33 +0200 Subject: [PATCH 14/34] revert: Update build-test-and-publish-ce.yml This reverts commit 9ad3835f2bf93504c7746b51b088b7873f30c774. --- .github/workflows/build-test-and-publish-ce.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index 62aa4b98..266287b4 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -29,11 +29,7 @@ jobs: } }); - name: Build - uses: nick-fields/retry@v2 - with: - timeout_seconds: 300 # seconds - max_attempts: 2 - command: ./pipeline.sh + run: ./pipeline.sh env: DISTRO: ${{ matrix.DISTRO }} EE: false From 3df3cc87689f3440cb560e2f5dd2638736db8b57 Mon Sep 17 00:00:00 2001 From: Petros Savvidis Date: Wed, 5 Jul 2023 10:16:35 +0300 Subject: [PATCH 15/34] chore(project): Use 3.18 tag instead --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7037613..7d4dc154 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.15 as builder +FROM alpine:3.18 as builder ARG VERSION=7.20.0 ARG DISTRO=tomcat @@ -30,7 +30,7 @@ RUN /tmp/download.sh ##### FINAL IMAGE ##### -FROM alpine:3.15 +FROM alpine:3.18 ARG VERSION=7.20.0 From 014d94feffb9e267df3af06a93ea670978f048c2 Mon Sep 17 00:00:00 2001 From: Petros Savvidis Date: Wed, 5 Jul 2023 14:00:13 +0300 Subject: [PATCH 16/34] Revert "chore(project): Use 3.18 tag instead" This reverts commit 3df3cc87689f3440cb560e2f5dd2638736db8b57. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d4dc154..a7037613 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 as builder +FROM alpine:3.15 as builder ARG VERSION=7.20.0 ARG DISTRO=tomcat @@ -30,7 +30,7 @@ RUN /tmp/download.sh ##### FINAL IMAGE ##### -FROM alpine:3.18 +FROM alpine:3.15 ARG VERSION=7.20.0 From e974a541515c3d8ecc7ba48625a430dd97036a79 Mon Sep 17 00:00:00 2001 From: psavidis <69160690+psavidis@users.noreply.github.com> Date: Thu, 20 Jul 2023 16:07:56 +0300 Subject: [PATCH 17/34] chore(project): Bump Alpine Version to 3.18 Related to: camunda/camunda-bpm-platform#3234 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7037613..7d4dc154 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.15 as builder +FROM alpine:3.18 as builder ARG VERSION=7.20.0 ARG DISTRO=tomcat @@ -30,7 +30,7 @@ RUN /tmp/download.sh ##### FINAL IMAGE ##### -FROM alpine:3.15 +FROM alpine:3.18 ARG VERSION=7.20.0 From 3f9c9a4ca59f7af2922c90d0e054088c0957341e Mon Sep 17 00:00:00 2001 From: tasso94 <3015690+tasso94@users.noreply.github.com> Date: Tue, 25 Jul 2023 17:21:21 +0200 Subject: [PATCH 18/34] fix(ci): trigger maintenance snapshot version (#275) related to camunda/camunda-bpm-platform#3515 --- .github/workflows/build-and-test-ee.yml | 15 ++++++++++++++- pipeline.sh | 17 ++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-ee.yml b/.github/workflows/build-and-test-ee.yml index f9146947..f868ce25 100644 --- a/.github/workflows/build-and-test-ee.yml +++ b/.github/workflows/build-and-test-ee.yml @@ -1,5 +1,14 @@ name: Build and Test EE -on: [pull_request, workflow_dispatch] + +on: + workflow_dispatch: + inputs: + version: + description: 'Camunda enterprise version to be tested' + snapshot: + description: 'Whether the version is a snapshot' + pull_request: + jobs: build-and-test-ee: if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' @@ -26,6 +35,8 @@ jobs: PLATFORM: ${{ matrix.PLATFORM }} NEXUS_PASS: ${{ secrets.NEXUS_PASS }} NEXUS_USER: ${{ secrets.NEXUS_USER }} + VERSION: ${{ github.event.inputs.version }} + SNAPSHOT: ${{ github.event.inputs.snapshot }} - name: Test run: ./test.sh working-directory: test @@ -33,3 +44,5 @@ jobs: DISTRO: ${{ matrix.DISTRO }} EE: true PLATFORM: ${{ matrix.PLATFORM }} + VERSION: ${{ github.event.inputs.version }} + SNAPSHOT: ${{ github.event.inputs.snapshot }} diff --git a/pipeline.sh b/pipeline.sh index 3c628612..23bcad77 100755 --- a/pipeline.sh +++ b/pipeline.sh @@ -1,6 +1,19 @@ -#!/bin/bash +#!/bin/bash -ex EE=${EE:-false} + +if [ -z "$SNAPSHOT" ]; then + SNAPSHOT_ARGUMENT="" +else + SNAPSHOT_ARGUMENT="--build-arg SNAPSHOT=${SNAPSHOT}" +fi + +if [ -z "$VERSION" ]; then + VERSION_ARGUMENT="" +else + VERSION_ARGUMENT="--build-arg VERSION=${VERSION}" +fi + IMAGE_NAME=camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM} docker buildx build . \ @@ -10,6 +23,8 @@ docker buildx build . \ --build-arg EE=${EE} \ --build-arg USER=${NEXUS_USER} \ --build-arg PASSWORD=${NEXUS_PASS} \ + ${VERSION_ARGUMENT} \ + ${SNAPSHOT_ARGUMENT} \ --cache-to type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ --cache-from type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \ --load From 5d7bee41161b1a0d688723f7014d29bc3244133e Mon Sep 17 00:00:00 2001 From: psavidis <69160690+psavidis@users.noreply.github.com> Date: Thu, 21 Sep 2023 10:33:38 +0300 Subject: [PATCH 19/34] chore(project): Add Missing HTTL on Process - historyTimeToLive is now mandatory by default Related to: camunda/camunda-bpm-platform#2994 --- test/testEncoding.bpmn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/testEncoding.bpmn b/test/testEncoding.bpmn index d14d231b..deb7100a 100644 --- a/test/testEncoding.bpmn +++ b/test/testEncoding.bpmn @@ -1,6 +1,7 @@ - - + + SequenceFlow_0anotay From 8af55a7a8ce1d8d95ca5be1e992880d4c959d96d Mon Sep 17 00:00:00 2001 From: psavidis <69160690+psavidis@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:37:55 +0300 Subject: [PATCH 20/34] chore(project): Bump Image Version to 7.21.0 Related to: camunda/camunda-bpm-platform/issues/3339 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d4dc154..6abe9d7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.18 as builder -ARG VERSION=7.20.0 +ARG VERSION=7.21.0 ARG DISTRO=tomcat ARG SNAPSHOT=true @@ -32,7 +32,7 @@ RUN /tmp/download.sh FROM alpine:3.18 -ARG VERSION=7.20.0 +ARG VERSION=7.21.0 ENV CAMUNDA_VERSION=${VERSION} ENV DB_DRIVER= From b4c25377a0096e631f678fe0e122e930d264ca76 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Fri, 27 Oct 2023 09:59:06 +0200 Subject: [PATCH 21/34] chore(readme): clarify cleaning setting.xml during build (#283) camunda/camunda-bpm-platform#3893 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 86182628..5c078483 100644 --- a/README.md +++ b/README.md @@ -308,10 +308,10 @@ docker run -d --name camunda -p 8080:8080 \ ## Build You can build a Docker image for a given Camunda Platform version and distribution yourself. -If you want to build the community edition (CE), make sure to adjust the -[settings.xml](settings.xml) -and remove the `camunda-nexus` mirror. -If you want to build the enterprise edition (EE), check out [the dedicated README section](#build-an-enterprise-version). +Make sure to adjust the [settings.xml](settings.xml) and remove the `camunda-nexus` server and mirror +(no matter if you are building a community or enterprise edition). +If you want to build the enterprise edition (EE), +check out [the dedicated README section](#build-an-enterprise-version). ### Build a released version From 04e7bac5e4dc89b2eb0b58488667ebe0da9d1f85 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Mon, 6 Nov 2023 11:34:27 +0100 Subject: [PATCH 22/34] chore(readme): specify camunda-nexus mirror only (#287) camunda/camunda-bpm-platform#3893 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c078483..361f2117 100644 --- a/README.md +++ b/README.md @@ -308,7 +308,7 @@ docker run -d --name camunda -p 8080:8080 \ ## Build You can build a Docker image for a given Camunda Platform version and distribution yourself. -Make sure to adjust the [settings.xml](settings.xml) and remove the `camunda-nexus` server and mirror +Make sure to adjust the [settings.xml](settings.xml) and remove the `camunda-nexus` mirror (no matter if you are building a community or enterprise edition). If you want to build the enterprise edition (EE), check out [the dedicated README section](#build-an-enterprise-version). From cf1570350b83a0a65179fd20a75b77d3bd4ccd90 Mon Sep 17 00:00:00 2001 From: nesies <107966+nesies@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:01:13 +0100 Subject: [PATCH 23/34] feat(docker): support multiple input for `wait-for-it` parameter * connects to the first available database connection after `WAIT_FOR_TIMEOUT` for each host:port pair * the pairs can be separated by an empty space or a comma --------- Co-authored-by: nesies <> --- Dockerfile | 1 + README.md | 5 ++++- camunda-lib.sh | 18 ++++++++++++++++++ camunda-run.sh | 6 +++--- camunda-tomcat.sh | 6 +++--- camunda-wildfly.sh | 6 +++--- 6 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 camunda-lib.sh diff --git a/Dockerfile b/Dockerfile index 6abe9d7a..9aa59175 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,7 @@ RUN apk add --no-cache \ COPY settings.xml download.sh camunda-run.sh camunda-tomcat.sh camunda-wildfly.sh /tmp/ RUN /tmp/download.sh +COPY camunda-lib.sh /camunda/ ##### FINAL IMAGE ##### diff --git a/README.md b/README.md index 361f2117..aa12b9fc 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,10 @@ includes [wait-for-it.sh](https://github.com/vishnubob/wait-for-it) to allow the container to wait until a 'host:port' is ready. The mechanism can be configured by two environment variables: -- `WAIT_FOR`: the service `host:port` to wait for +- `WAIT_FOR`: the service `host:port` to wait for. (In case of active/passive database setup, +expecting to connect to the first available, +you can also provide multiple host-port pairs separated by a comma or an empty space: +(`"host1:port1 host2:port2"`) - `WAIT_FOR_TIMEOUT`: how long to wait for the service to be available in seconds Example with a PostgreSQL container: diff --git a/camunda-lib.sh b/camunda-lib.sh new file mode 100644 index 00000000..7e93a7b1 --- /dev/null +++ b/camunda-lib.sh @@ -0,0 +1,18 @@ +wait_for_it() { + if [ -n "${WAIT_FOR}" ]; then + found=0 + for host_port in $(echo "${WAIT_FOR}" | tr ',' '\n'); do + if wait-for-it.sh "$host_port" -s -t ${WAIT_FOR_TIMEOUT} ; then + echo "$host_port available" + found=1 + break + else + echo "$host_port not available" + fi + done + if [ "$found" -eq 0 ] ; then + echo "No connection available in WAIT_FOR=$WAIT_FOR" + exit 1 + fi + fi +} diff --git a/camunda-run.sh b/camunda-run.sh index 85d8e3b6..803db9ec 100755 --- a/camunda-run.sh +++ b/camunda-run.sh @@ -3,6 +3,8 @@ set -Eeu trap 'Error on line $LINENO' ERR +source $(dirname "$0")/camunda-lib.sh + # Set Password as Docker Secrets for Swarm-Mode if [[ -z "${DB_PASSWORD:-}" && -n "${DB_PASSWORD_FILE:-}" && -f "${DB_PASSWORD_FILE:-}" ]]; then export DB_PASSWORD="$(< "${DB_PASSWORD_FILE}")" @@ -30,9 +32,7 @@ fi CMD="/camunda/internal/run.sh start" -if [ -n "${WAIT_FOR}" ]; then - CMD="wait-for-it.sh ${WAIT_FOR} -s -t ${WAIT_FOR_TIMEOUT} -- ${CMD}" -fi +wait_for_it # shellcheck disable=SC2086 exec ${CMD} "$@" diff --git a/camunda-tomcat.sh b/camunda-tomcat.sh index 51b1d5d2..c27c287a 100755 --- a/camunda-tomcat.sh +++ b/camunda-tomcat.sh @@ -3,6 +3,8 @@ set -Eeu trap 'Error on line $LINENO' ERR +source $(dirname "$0")/camunda-lib.sh + # Use existing tomcat distribution if present.. CATALINA_HOME="${CATALINA_HOME:-/camunda}" @@ -58,9 +60,7 @@ fi CMD+=" run" -if [ -n "${WAIT_FOR}" ]; then - CMD="wait-for-it.sh ${WAIT_FOR} -s -t ${WAIT_FOR_TIMEOUT} -- ${CMD}" -fi +wait_for_it # shellcheck disable=SC2086 exec ${CMD} diff --git a/camunda-wildfly.sh b/camunda-wildfly.sh index ded70e94..1c692c8f 100755 --- a/camunda-wildfly.sh +++ b/camunda-wildfly.sh @@ -3,6 +3,8 @@ set -Eeu trap 'Error on line $LINENO' ERR +source $(dirname "$0")/camunda-lib.sh + # Set default values for DB_ variables # Set Password as Docker Secrets for Swarm-Mode if [[ -z "${DB_PASSWORD:-}" && -n "${DB_PASSWORD_FILE:-}" && -f "${DB_PASSWORD_FILE:-}" ]]; then @@ -80,9 +82,7 @@ if [ "$JMX_PROMETHEUS" = "true" ] ; then export PREPEND_JAVA_OPTS="${PREPEND_JAVA_OPTS} -javaagent:/camunda/javaagent/jmx_prometheus_javaagent.jar=${JMX_PROMETHEUS_PORT}:${JMX_PROMETHEUS_CONF}" fi -if [ -n "${WAIT_FOR}" ]; then - CMD="wait-for-it.sh ${WAIT_FOR} -s -t ${WAIT_FOR_TIMEOUT} -- ${CMD}" -fi +wait_for_it # shellcheck disable=SC2086 exec ${CMD} From d50a82b093a40e7dcb86a28c15b800278a3b34fb Mon Sep 17 00:00:00 2001 From: psavidis <69160690+psavidis@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:14:54 +0200 Subject: [PATCH 24/34] chore(root): Adjust Supported JDK README - Adjust the README to reflect more accurately the JDK used by each version - Latest JDK 21 is supported and 7.21 uses JDK 17 Co-authored-by: yanavasileva Related-to: https://github.com/camunda/camunda-bpm-platform/issues/4002 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa12b9fc..cc41a6d3 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ disables Swagger UI by default. ### Java versions -Our docker images are using the latest LTS OpenJDK version supported by +Our docker images are using a LTS OpenJDK version supported by Camunda Platform. This currently means: - Camunda 7.20 or later will be based on OpenJDK 17. From d713e966f6e3f2f97c216591cb9775d438d10bb5 Mon Sep 17 00:00:00 2001 From: Miklas Boskamp <20189772+mboskamp@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:26:50 +0100 Subject: [PATCH 25/34] chore(docs): Improve documentation of wait for host feature (#293) Related to https://github.com/camunda/camunda-bpm-platform/issues/3555 Co-authored-by: yanavasileva --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cc41a6d3..31cf864e 100644 --- a/README.md +++ b/README.md @@ -192,8 +192,8 @@ variables: Make sure that `DB_PASSWORD` is not set when using this variable! - `SKIP_DB_CONFIG` skips the automated database configuration to use manual configuration -- `WAIT_FOR` wait for a `host:port` to be available over TCP before starting -- `WAIT_FOR_TIMEOUT` how long to wait for the service to be avaiable - defaults to 30 seconds +- `WAIT_FOR` wait for a `host:port` to be available over TCP before starting. Check [Waiting for database](#waiting-for-database) for details. +- `WAIT_FOR_TIMEOUT` how long to wait for the service to be avaiable - defaults to 30 seconds. Check [Waiting for database](#waiting-for-database) for details. For example, to use a `postgresql` docker image as database you can start the platform as follows: @@ -253,11 +253,13 @@ includes [wait-for-it.sh](https://github.com/vishnubob/wait-for-it) to allow the container to wait until a 'host:port' is ready. The mechanism can be configured by two environment variables: -- `WAIT_FOR`: the service `host:port` to wait for. (In case of active/passive database setup, -expecting to connect to the first available, -you can also provide multiple host-port pairs separated by a comma or an empty space: -(`"host1:port1 host2:port2"`) - `WAIT_FOR_TIMEOUT`: how long to wait for the service to be available in seconds +- `WAIT_FOR`: the service `host:port` to wait for. You can provide multiple +host-port pairs separated by a comma or an empty space (Example: +`"host1:port1 host2:port2"`). +The `WAIT_FOR_TIMEOUT` applies to each specified host, i.e. Camunda will wait for +`host1:port1` to become available and, if unavailable for the complete `WAIT_FOR_TIMEOUT` +duration, will wait for `host2:port2` for another `WAIT_FOR_TIMEOUT` period. Example with a PostgreSQL container: From 24d3a33137347528068121460485272c5024ad86 Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Wed, 3 Apr 2024 16:48:25 +0200 Subject: [PATCH 26/34] chore(project): bump minor version to 7.22 related to https://github.com/camunda/camunda-bpm-platform/issues/3853 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9aa59175..8c8f1d01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.18 as builder -ARG VERSION=7.21.0 +ARG VERSION=7.22.0 ARG DISTRO=tomcat ARG SNAPSHOT=true @@ -33,7 +33,7 @@ COPY camunda-lib.sh /camunda/ FROM alpine:3.18 -ARG VERSION=7.21.0 +ARG VERSION=7.22.0 ENV CAMUNDA_VERSION=${VERSION} ENV DB_DRIVER= From 4769f12e9ce73126c0a912c0f981ee63046092a5 Mon Sep 17 00:00:00 2001 From: punitdarira Date: Mon, 6 May 2024 09:40:05 -0400 Subject: [PATCH 27/34] feat(database): add mysql and postgresql version arguments (#296) related to https://github.com/camunda/camunda-bpm-platform/issues/2692 --- Dockerfile | 3 +++ README.md | 11 +++++++++++ download.sh | 8 ++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c8f1d01..3d4ed7fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,9 @@ ARG MAVEN_PROXY_PORT ARG MAVEN_PROXY_USER ARG MAVEN_PROXY_PASSWORD +ARG POSTGRESQL_VERSION +ARG MYSQL_VERSION + ARG JMX_PROMETHEUS_VERSION=0.12.0 RUN apk add --no-cache \ diff --git a/README.md b/README.md index 31cf864e..0d5587d3 100644 --- a/README.md +++ b/README.md @@ -396,6 +396,17 @@ docker build -t camunda-bpm-platform \ --build-arg MAVEN_PROXY_PASSWORD=${PROXY_PASSWORD} \ . ``` +### Override MySQL and PostgreSQL driver versions. +By default, the driver versions are fetched from https://github.com/camunda/camunda-bpm-platform/blob/master/database/pom.xml. That can be overriden by passing `MYSQL_VERSION` and `POSTGRESQL_VERSION` build args + +``` +docker build -t camunda-bpm-platform \ + --build-arg DISTRO=${DISTRO} \ + --build-arg VERSION=${VERSION} \ + --build-arg POSTGRESQL_VERSION=${POSTGRESQL_VERSION} \ + --build-arg MYSQL_VERSION=${MYSQL_VERSION} \ + . +``` ## Use cases diff --git a/download.sh b/download.sh index 812622e5..2d831219 100755 --- a/download.sh +++ b/download.sh @@ -82,8 +82,12 @@ mvn dependency:get -U -B --global-settings /tmp/settings.xml \ -DgroupId="org.camunda.bpm" -DartifactId="camunda-database-settings" \ -Dversion="${ARTIFACT_VERSION}" -Dpackaging="pom" -Dtransitive=false cambpmdbsettings_pom_file=$(find /m2-repository -name "camunda-database-settings-${ARTIFACT_VERSION}.pom" -print | head -n 1) -MYSQL_VERSION=$(xmlstarlet sel -t -v //_:version.mysql $cambpmdbsettings_pom_file) -POSTGRESQL_VERSION=$(xmlstarlet sel -t -v //_:version.postgresql $cambpmdbsettings_pom_file) +if [ -z "$MYSQL_VERSION" ]; then + MYSQL_VERSION=$(xmlstarlet sel -t -v //_:version.mysql $cambpmdbsettings_pom_file) +fi +if [ -z "$POSTGRESQL_VERSION" ]; then + POSTGRESQL_VERSION=$(xmlstarlet sel -t -v //_:version.postgresql $cambpmdbsettings_pom_file) +fi mvn dependency:copy -B \ $PROXY \ From 8567184abcda71cc88a0217ca45e9b19ffbd1a51 Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Fri, 3 May 2024 13:13:12 +0200 Subject: [PATCH 28/34] chore(project): bump deprecated nodejs 16 actions --- .github/workflows/build-and-test-ee.yml | 6 +++--- .github/workflows/build-test-and-publish-ce.yml | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-test-ee.yml b/.github/workflows/build-and-test-ee.yml index f868ce25..ae9bf0f0 100644 --- a/.github/workflows/build-and-test-ee.yml +++ b/.github/workflows/build-and-test-ee.yml @@ -19,14 +19,14 @@ jobs: PLATFORM: [amd64, arm64] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 if: ${{ matrix.PLATFORM != 'amd64' }} with: platforms: ${{ matrix.PLATFORM }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build run: ./pipeline.sh env: diff --git a/.github/workflows/build-test-and-publish-ce.yml b/.github/workflows/build-test-and-publish-ce.yml index 266287b4..2c15ffea 100644 --- a/.github/workflows/build-test-and-publish-ce.yml +++ b/.github/workflows/build-test-and-publish-ce.yml @@ -10,16 +10,16 @@ jobs: PLATFORM: [amd64, arm64] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 if: ${{ matrix.PLATFORM != 'amd64' }} with: platforms: ${{ matrix.PLATFORM }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Expose GitHub Runtime - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | Object.keys(process.env).forEach(function (key) { @@ -52,15 +52,15 @@ jobs: DISTRO: [tomcat, wildfly, run] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: arm64,amd64 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Expose GitHub Runtime - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | Object.keys(process.env).forEach(function (key) { From 5b7d54e7a08a61a9d5d0042a5bd6ce6635afee18 Mon Sep 17 00:00:00 2001 From: yanavasileva Date: Mon, 17 Jun 2024 18:09:57 +0200 Subject: [PATCH 29/34] chore(workflows): add `stale` workflow (#299) camunda/team-automation-platform#147 --- .github/workflows/close-stale-issues.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/close-stale-issues.yml diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml new file mode 100644 index 00000000..8710f98c --- /dev/null +++ b/.github/workflows/close-stale-issues.yml @@ -0,0 +1,14 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 2 * * 2-6' + workflow_dispatch: # can be used to trigger the workflow manually + +jobs: + call-reusable-flow: + uses: camunda/automation-platform-github-actions/.github/workflows/close-stale-issues.yml@main From 11579569f0754c12099e9264b999d8348c8e36a7 Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Tue, 6 Aug 2024 11:46:15 +0200 Subject: [PATCH 30/34] chore(project): change docker compose command --- README.md | 2 +- test/test.sh | 4 ++-- test/test_helper.sh | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0d5587d3..09948573 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ docker run -d --name camunda -p 8080:8080 -e SKIP_DB_CONFIG=true \ Starting the Camunda Platform Docker image requires the database to be already available. This is quite a challenge when the database and Camunda Platform are -both docker containers spawned simultaneously, for example, by `docker-compose` +both docker containers spawned simultaneously, for example, by `docker compose` or inside a Kubernetes Pod. To help with that, the Camunda Platform Docker image includes [wait-for-it.sh](https://github.com/vishnubob/wait-for-it) to allow the container to wait until a 'host:port' is ready. The mechanism can be configured diff --git a/test/test.sh b/test/test.sh index 9bee51a8..305c8bcb 100755 --- a/test/test.sh +++ b/test/test.sh @@ -3,12 +3,12 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) cd ${DIR} -docker-compose up --force-recreate -d postgres mysql +docker compose up --force-recreate -d postgres mysql ./test-${DISTRO}.sh camunda ./test-${DISTRO}.sh camunda-mysql ./test-${DISTRO}.sh camunda-postgres ./test-${DISTRO}.sh camunda-password-file ./test-prometheus-jmx-${DISTRO}.sh camunda-prometheus-jmx ./test-debug.sh camunda-debug -docker-compose down -v +docker compose down -v cd - diff --git a/test/test_helper.sh b/test/test_helper.sh index 75d938ab..5995046d 100644 --- a/test/test_helper.sh +++ b/test/test_helper.sh @@ -7,8 +7,8 @@ function _log { function stop_container { docker logs $(container_id) - docker-compose kill ${SERVICE} - docker-compose rm --force ${SERVICE} + docker compose kill ${SERVICE} + docker compose rm --force ${SERVICE} } function _exit { @@ -18,11 +18,11 @@ function _exit { } function start_container { - docker-compose up -d --no-recreate ${SERVICE} || _exit 1 "Unable to start compose" + docker compose up -d --no-recreate ${SERVICE} || _exit 1 "Unable to start compose" } function container_id { - docker-compose ps -q ${SERVICE} + docker compose ps -q ${SERVICE} } function grep_log { From b6fa15de6968d23ef021033709f6e0af592c8416 Mon Sep 17 00:00:00 2001 From: Daniel Kelemen Date: Wed, 7 Aug 2024 12:20:39 +0200 Subject: [PATCH 31/34] chore(project): add docker-compose alias for GHA (#301) --- test/test.sh | 7 +++++-- test/test_helper.sh | 15 +++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/test/test.sh b/test/test.sh index 305c8bcb..bb8a4b9f 100755 --- a/test/test.sh +++ b/test/test.sh @@ -3,12 +3,15 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) cd ${DIR} -docker compose up --force-recreate -d postgres mysql + +source test_helper.sh + +docker-compose up --force-recreate -d postgres mysql ./test-${DISTRO}.sh camunda ./test-${DISTRO}.sh camunda-mysql ./test-${DISTRO}.sh camunda-postgres ./test-${DISTRO}.sh camunda-password-file ./test-prometheus-jmx-${DISTRO}.sh camunda-prometheus-jmx ./test-debug.sh camunda-debug -docker compose down -v +docker-compose down -v cd - diff --git a/test/test_helper.sh b/test/test_helper.sh index 5995046d..0a1e0925 100644 --- a/test/test_helper.sh +++ b/test/test_helper.sh @@ -1,14 +1,21 @@ #!/bin/bash -eu RETRIES=100 WAIT=5 + +GHA=${GITHUB_ACTIONS:-false} +if [ "${GHA}" = "true" ]; then + shopt -s expand_aliases + alias docker-compose="docker compose" +fi + function _log { >&2 echo $@ } function stop_container { docker logs $(container_id) - docker compose kill ${SERVICE} - docker compose rm --force ${SERVICE} + docker-compose kill ${SERVICE} + docker-compose rm --force ${SERVICE} } function _exit { @@ -18,11 +25,11 @@ function _exit { } function start_container { - docker compose up -d --no-recreate ${SERVICE} || _exit 1 "Unable to start compose" + docker-compose up -d --no-recreate ${SERVICE} || _exit 1 "Unable to start compose" } function container_id { - docker compose ps -q ${SERVICE} + docker-compose ps -q ${SERVICE} } function grep_log { From 87f58db990de8809b7e20af1e0cd0c51f22f845e Mon Sep 17 00:00:00 2001 From: tasso94 <3015690+tasso94@users.noreply.github.com> Date: Thu, 5 Sep 2024 08:37:15 +0200 Subject: [PATCH 32/34] test(mysql): configure to read committed (#305) related to camunda/camunda-bpm-platform#4516 --- test/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 91fd8585..25dd79f5 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -13,7 +13,7 @@ services: platform: linux/${PLATFORM} environment: - DB_DRIVER=com.mysql.cj.jdbc.Driver - - DB_URL=jdbc:mysql://mysql:3306/process-engine?sendFractionalSeconds=false + - DB_URL=jdbc:mysql://mysql:3306/process-engine?sendFractionalSeconds=false&sessionVariables=transaction_isolation='READ-COMMITTED' - DB_USERNAME=camunda - DB_PASSWORD=camunda - WAIT_FOR=mysql:3306 @@ -63,7 +63,7 @@ services: platform: linux/${PLATFORM} environment: - DB_DRIVER=com.mysql.cj.jdbc.Driver - - DB_URL=jdbc:mysql://mysql:3306/process-engine?sendFractionalSeconds=false + - DB_URL=jdbc:mysql://mysql:3306/process-engine?sendFractionalSeconds=false&sessionVariables=transaction_isolation='READ-COMMITTED' - DB_USERNAME=camunda - DB_PASSWORD_FILE=/run/secrets/camunda_db_password - WAIT_FOR=mysql:3306 From e8f4d9a02bdd9d081c23054ea6332739e44773a9 Mon Sep 17 00:00:00 2001 From: psavidis <69160690+psavidis@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:01:37 +0300 Subject: [PATCH 33/34] chore(project): Bump Minor Version to 7.23 Related-to: https://github.com/camunda/camunda-bpm-platform/issues/4271 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d4ed7fd..33dee7ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.18 as builder -ARG VERSION=7.22.0 +ARG VERSION=7.23.0 ARG DISTRO=tomcat ARG SNAPSHOT=true @@ -36,7 +36,7 @@ COPY camunda-lib.sh /camunda/ FROM alpine:3.18 -ARG VERSION=7.22.0 +ARG VERSION=7.23.0 ENV CAMUNDA_VERSION=${VERSION} ENV DB_DRIVER= From a0c3360910cc6c2561368d4165785f233b75ae78 Mon Sep 17 00:00:00 2001 From: tasso94 <3015690+tasso94@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:14:45 +0100 Subject: [PATCH 34/34] fix(README): change link to enterprise support page --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09948573..c17e9414 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Camunda Platform Docker images > Use our [GitHub issue tracker](https://github.com/camunda/camunda-bpm-platform/issues) for bug reports or feature requests. -> For help requests, open a help request topic on the [Camunda forum](https://forum.camunda.org/) or [a help request support ticket](https://docs.camunda.org/enterprise/support/#how-to-create-a-support-issue) if you are an enterprise customer. +> For help requests, open a help request topic on the [Camunda forum](https://forum.camunda.org/) or [a help request support ticket](https://camunda.com/services/enterprise-support-guide/#how-to-create-a-support-issue) if you are an enterprise customer. This Camunda project provides docker images of the latest Camunda Platform releases. The images can be used to demonstrate and test the