Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9c5dc831 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Pull request #64: Reorganize test modules

Merge in EDELIVERY/smp from EDELIVERY-12701-reorganize-maven-testing-modulues to development

* commit 'f25f9e0f':
  Delete old smp-ui-tests module
  Reorganize test module
parents 091697e2 f25f9e0f
No related branches found
No related tags found
No related merge requests found
Pipeline #132124 canceled
Showing
with 75 additions and 0 deletions
#!/usr/bin/env bash
# This is build script for building image.
# first it copies external resources to resources folder
# then it builds the image using docker-compose.build.yml
# and finally it cleans the external resources
: "${SMP_PROJECT_FOLDER:?Need to set SMP project folder non-empty!}"
: "${SMP_VERSION:?Need to set SMP version non-empty!}"
: "${SMP_ARTEFACTS:?Need to set SMP_ARTEFACTS non-empty!}"
WORKING_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${WORKING_DIR}"
copyExternalImageResources() {
echo "Copy test project resources ..."
# copy artefact to docker build folder
cleanExternalImageResources
mkdir -p ./artefacts
# copy artefact to docker build folder
cp -r ../shared-artefacts ./artefacts/
if [[ ! -d "${SMP_PLUGIN_EXAMPLE}" ]]; then
echo "SMP SPI plugin '${SMP_PLUGIN_EXAMPLE}' not found. copy from artefacts ${SMP_ARTEFACTS}!"
ls -ltr ${SMP_ARTEFACTS}
cp "${SMP_ARTEFACTS}/smp-spi-payload-validation-example-$SMP_VERSION.jar" ./artefacts/smp-spi-payload-validation-example.jar
else
cp "${SMP_PLUGIN_EXAMPLE}/smp-spi-payload-validation-example-$SMP_VERSION.jar" ./artefacts/smp-spi-payload-validation-example.jar
fi
if [[ ! -f "${SMP_ARTEFACTS}/smp.war" ]]; then
echo "SMP artefact '${SMP_ARTEFACTS}/smp.war' not found. Was project built?"
exit 1
else
# for mysql tomcat
cp "${SMP_ARTEFACTS}/smp.war" ./artefacts/smp.war
fi
if [[ ! -f "${SMP_ARTEFACTS}/smp-${SMP_VERSION}-setup.zip" ]]; then
echo "SMP bundle artefact '${SMP_ARTEFACTS}/smp-${SMP_VERSION}-setup.zip' not found!"
exit 1
else
# for mysql data
cp "${SMP_ARTEFACTS}/smp-${SMP_VERSION}-setup.zip" ./artefacts/smp-setup.zip
fi
}
cleanExternalImageResources() {
echo "Clean external resources ..."
[[ -d ./artefacts ]] && rm -rf ./artefacts/
}
composeBuildImage() {
echo "Build ${IMAGE_NAME_DOMIBUS_SOAPUI} image..."
docker compose -f docker-compose.build.yml build
}
# clean external resources before copy
copyExternalImageResources
composeBuildImage
cleanExternalImageResources
#
# Docker compose project used to build the domibus soapui docker image.
#
version: '3.2'
services:
domismp-springboot-mysql:
image: ${IMAGE_TAG:-edeliverytest}/${IMAGE_SMP_TOMCAT_MYSQL}:${SMP_VERSION}
build:
context: .
args:
- SMP_VERSION
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment