Skip to content

Commit

Permalink
Merge branch 'release/2022.3' into main
Browse files Browse the repository at this point in the history
jenkins committed Aug 16, 2022
2 parents bd40c91 + 219f276 commit 2b35ec7
Showing 6 changed files with 52 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@
# 1. a tagged release e.g. 4.10.0
# 2. a branch e.g. main or develop
# 3. a git commit hash
MDM_APPLICATION_COMMIT=5.1.0
MDM_UI_COMMIT=7.1.0
MDM_APPLICATION_COMMIT=5.2.0
MDM_UI_COMMIT=7.2.0

# Change this to alter the port MDM is published to
MDM_PORT=8082

# Change this to change the tag assigned to the built docker mdm image
MDM_TAG=2022.2
MDM_TAG=2022.3
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ services:
ADDITIONAL_PLUGINS: ""
MDM_UI_THEME_NAME: "default"
CACHE_BURST: "${CACHE_BURST}"
MDM_EXPLORER_API_ENDPOINT: "http://localhost:${MDM_PORT}/api"
environment:
PGPASSWORD: postgresisawesome
runtime.config.path: /usr/local/tomcat/conf/runtime.yml
16 changes: 16 additions & 0 deletions mauro-data-mapper/Dockerfile
Original file line number Diff line number Diff line change
@@ -10,6 +10,12 @@ ARG MDM_UI_COMMIT=main
ARG ADDITIONAL_PLUGINS=""
ARG MDM_UI_THEME_NAME="default"
ARG MDM_UI_FEATURE_SUBSCRIBED_CATALOGUES="true"

ARG DEPLOY_MDM_EXPLORER=0
ARG MDM_EXPLORER_VERSION="1.0.0-SNAPSHOT"
ARG MDM_EXPLORER_BUILD_HOME=/opt/mdm-explorer/dist
ARG MDM_EXPLORER_API_ENDPOINT="http://localhost:${MDM_PORT}/api"

# This is needed to ensure the fetch and checkout are always run
# If the arg is passed in using a random value then it will invalidate the docker cache and force the following steps to re-run
ARG CACHE_BURST=1
@@ -21,6 +27,13 @@ ARG CACHE_BURST=1
# Checkout the desired versions
RUN cd "$MDM_APPLICATION_HOME" && git fetch && git checkout "$MDM_APPLICATION_COMMIT" && if [[ `git status` != HEAD\ detached* ]]; then git pull; fi
RUN cd "$MDM_UI_HOME" && git fetch && git checkout "$MDM_UI_COMMIT" && if [[ `git status` != HEAD\ detached* ]]; then git pull; fi
RUN mkdir -p $MDM_EXPLORER_BUILD_HOME

# Copy in the building scripts
COPY build_scripts /usr/local/bin/

# Make sure all scripts are executable
RUN chmod a+x /usr/local/bin/*

# Copy in build.yml
COPY config/build.yml $MDM_APPLICATION_HOME/grails-app/conf/build.yml
@@ -31,6 +44,7 @@ COPY mdm-ui $MDM_UI_HOME/
# Build the front and back ends
# The front end build will try to use precompiled sources or it will build locally from the given commit/tagU
RUN build_frontend.sh
RUN build_explorer.sh

# The only way to include plugins is to build the API manually, however this actually takes very little time as we already have all the
# dependencies downloaded
@@ -48,7 +62,9 @@ FROM maurodatamapper/tomcat:$TOMCAT_IMAGE_VERSION
LABEL maintainer="Oliver Freeman <oliver.freeman@bdi.ox.ac.uk>"

ARG MDM_BUILD_HOME=/opt/mdm
ARG MDM_EXPLORER_BUILD_HOME=/opt/mdm-explorer/dist

ENV CATALINA_OPTS="-Xmx8g -Xms512m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+UseCompressedOops"

COPY --from=mdm-build ${MDM_BUILD_HOME} ${CATALINA_HOME}/webapps/ROOT
COPY --from=mdm-build ${MDM_EXPLORER_BUILD_HOME} ${CATALINA_HOME}/webapps/explorer
26 changes: 26 additions & 0 deletions mauro-data-mapper/build_scripts/build_explorer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

precompiledBuild(){
echo 'Using pre-compiled source'

if [[ $MDM_EXPLORER_VERSION == *SNAPSHOT ]]
then
MDM_EXPLORER_LIBRARY='artifacts-snapshots'
else
MDM_EXPLORER_LIBRARY='artifacts'
fi

MDM_EXPLORER_URL="http://jenkins.cs.ox.ac.uk/artifactory/${MDM_EXPLORER_LIBRARY}/mauroDataMapper/mdm-explorer/mdm-explorer-${MDM_EXPLORER_VERSION}.tgz"

echo "Downloading precompiled sources ${MDM_EXPLORER_URL}"

cd /opt || exit
curl -LO "$MDM_EXPLORER_URL"
tar xzf "mdm-explorer-${MDM_EXPLORER_VERSION}.tgz"
mkdir "$MDM_EXPLORER_BUILD_HOME"
cp -r "mdm-explorer-${MDM_EXPLORER_VERSION}"/* "$MDM_EXPLORER_BUILD_HOME"

find "$MDM_EXPLORER_BUILD_HOME" -name main.*.js -exec sed -e "s|apiEndpoint:\"api\",|apiEndpoint:\"${MDM_EXPLORER_API_ENDPOINT}\",|g" -i {} \;
}

precompiledBuild
2 changes: 1 addition & 1 deletion postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:12.0-alpine
FROM postgres:12.10-alpine
COPY fixtures /docker-entrypoint-initdb.d

ENV POSTGRES_PASSWORD=postgresisawesome \
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"config:base"
]
}

0 comments on commit 2b35ec7

Please sign in to comment.