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

feat(docker-camunda-bpm-platform): Added sql and postgresql version arguements #296

Merged
merged 3 commits into from
May 6, 2024
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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down