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

Fork Sync: Update from parent repository #4

Open
wants to merge 34 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ff7f677
feat(docker): update ubuntu version
danielkelemen Dec 6, 2022
e55c4eb
feat(docker): add arm64 build
danielkelemen Jan 10, 2023
07f30a8
feat(docker): increase test retries
danielkelemen Jan 11, 2023
536dc06
Adjust maven config to use CI Nexus as a cache mechanism for Artifactory
chaima-mnsr Feb 2, 2023
b12585c
fix(nexus): adding proper nexus secrets for publish stage
Feb 10, 2023
60c29a8
chore(deps): bump db versions to latest supported
yanavasileva Feb 22, 2023
ec021b0
chore(download): adjust mysql jdbc driver
yanavasileva Feb 23, 2023
3eddd68
chore(ci): continue parallel builds on failure
tmetzke Mar 20, 2023
d41faa7
chore(test): rename wildfly invoice application (#262)
yanavasileva Mar 27, 2023
b638683
chore(project): bump next to 7.20 (#263)
yanavasileva Apr 4, 2023
c0a1489
chore(readme): document how to build the CE image
mboskamp Apr 25, 2023
89fb871
chore(dockerfile): bump to JDK 17
yanavasileva Jun 15, 2023
9ad3835
Update build-test-and-publish-ce.yml
yanavasileva Jun 16, 2023
6583c7b
revert: Update build-test-and-publish-ce.yml
yanavasileva Jun 16, 2023
3df3cc8
chore(project): Use 3.18 tag instead
psavidis Jul 5, 2023
014d94f
Revert "chore(project): Use 3.18 tag instead"
psavidis Jul 5, 2023
e974a54
chore(project): Bump Alpine Version to 3.18
psavidis Jul 20, 2023
3f9c9a4
fix(ci): trigger maintenance snapshot version (#275)
tasso94 Jul 25, 2023
5d7bee4
chore(project): Add Missing HTTL on Process
psavidis Sep 21, 2023
8af55a7
chore(project): Bump Image Version to 7.21.0
psavidis Oct 5, 2023
b4c2537
chore(readme): clarify cleaning setting.xml during build (#283)
yanavasileva Oct 27, 2023
04e7bac
chore(readme): specify camunda-nexus mirror only (#287)
yanavasileva Nov 6, 2023
cf15703
feat(docker): support multiple input for `wait-for-it` parameter
nesies Jan 3, 2024
d50a82b
chore(root): Adjust Supported JDK README
psavidis Mar 11, 2024
d713e96
chore(docs): Improve documentation of wait for host feature (#293)
mboskamp Mar 27, 2024
24d3a33
chore(project): bump minor version to 7.22
danielkelemen Apr 3, 2024
4769f12
feat(database): add mysql and postgresql version arguments (#296)
punitdarira May 6, 2024
8567184
chore(project): bump deprecated nodejs 16 actions
danielkelemen May 3, 2024
5b7d54e
chore(workflows): add `stale` workflow (#299)
yanavasileva Jun 17, 2024
1157956
chore(project): change docker compose command
danielkelemen Aug 6, 2024
b6fa15d
chore(project): add docker-compose alias for GHA (#301)
danielkelemen Aug 7, 2024
87f58db
test(mysql): configure to read committed (#305)
tasso94 Sep 5, 2024
e8f4d9a
chore(project): Bump Minor Version to 7.23
psavidis Oct 2, 2024
a0c3360
fix(README): change link to enterprise support page
tasso94 Nov 8, 2024
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
38 changes: 34 additions & 4 deletions .github/workflows/build-and-test-ee.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
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'
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
matrix:
DISTRO: [tomcat, wildfly, run]
PLATFORM: [amd64, arm64]
steps:
- uses: actions/checkout@v2
- name: Execute pipeline
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.PLATFORM != 'amd64' }}
with:
platforms: ${{ matrix.PLATFORM }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: ./pipeline.sh
env:
DISTRO: ${{ matrix.DISTRO }}
EE: true
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
env:
DISTRO: ${{ matrix.DISTRO }}
EE: true
PLATFORM: ${{ matrix.PLATFORM }}
VERSION: ${{ github.event.inputs.version }}
SNAPSHOT: ${{ github.event.inputs.snapshot }}
68 changes: 63 additions & 5 deletions .github/workflows/build-test-and-publish-ce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,80 @@ 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:
fail-fast: false
matrix:
DISTRO: [tomcat, wildfly, run]
PLATFORM: [amd64, arm64]
steps:
- uses: actions/checkout@v2
- name: Execute pipeline
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.PLATFORM != 'amd64' }}
with:
platforms: ${{ matrix.PLATFORM }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Expose GitHub Runtime
uses: actions/github-script@v7
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 }}
NEXUS_PASS: ${{ secrets.NEXUS_PASS }}
NEXUS_USER: ${{ secrets.NEXUS_USER }}
- 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@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64,amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Expose GitHub Runtime
uses: actions/github-script@v7
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 }}
NEXUS_PASS: ${{ secrets.NEXUS_PASS }}
NEXUS_USER: ${{ secrets.NEXUS_USER }}
14 changes: 14 additions & 0 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.15 as builder
FROM alpine:3.18 as builder

ARG VERSION=7.19.0
ARG VERSION=7.23.0
ARG DISTRO=tomcat
ARG SNAPSHOT=true

Expand All @@ -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 \
Expand All @@ -26,13 +29,14 @@ 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 #####

FROM alpine:3.15
FROM alpine:3.18

ARG VERSION=7.19.0
ARG VERSION=7.23.0

ENV CAMUNDA_VERSION=${VERSION}
ENV DB_DRIVER=
Expand Down Expand Up @@ -62,7 +66,7 @@ RUN apk add --no-cache \
bash \
ca-certificates \
curl \
openjdk11-jre-headless \
openjdk17-jre-headless \
tzdata \
tini \
xmlstarlet \
Expand Down
53 changes: 37 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# 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.
> 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.
> 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://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
Expand Down Expand Up @@ -141,14 +140,17 @@ 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.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

Expand All @@ -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.
Expand Down Expand Up @@ -190,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:
Expand Down Expand Up @@ -245,14 +247,19 @@ 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
by two environment variables:

- `WAIT_FOR`: the service `host:port` to wait for
- `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:

Expand Down Expand Up @@ -305,8 +312,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.
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).

### Build a released version

Expand Down Expand Up @@ -341,8 +351,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.
Expand Down Expand Up @@ -386,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

Expand Down
18 changes: 18 additions & 0 deletions camunda-lib.sh
Original file line number Diff line number Diff line change
@@ -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
}
6 changes: 3 additions & 3 deletions camunda-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}")"
Expand Down Expand Up @@ -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} "$@"
6 changes: 3 additions & 3 deletions camunda-tomcat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -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}
6 changes: 3 additions & 3 deletions camunda-wildfly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Loading