mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2026-04-16 22:24:32 +00:00
39 lines
1.4 KiB
Bash
Executable File
39 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
echo "=========================== Starting Test&Deploy Script ==========================="
|
|
PS4="\[\e[35m\]+ \[\e[m\]"
|
|
set -vex
|
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
|
|
|
|
# Always build the image, but only publish from the "master" branch
|
|
[ "${PULL_REQUEST}" = "false" ] && [ "${BRANCH_NAME}" = "master" ] && PROFILE="internal" || PROFILE="local"
|
|
|
|
# If the branch is "master" and the commit is not a Pull Request then deploy the JAR SNAPSHOT artifacts
|
|
[ "${PULL_REQUEST}" = "false" ] && [ "${BRANCH_NAME}" = "master" ] && MAVEN_PHASE="deploy" || MAVEN_PHASE="verify"
|
|
|
|
if [ "${SMOKE_TESTS}" = "true" ]; then
|
|
ADDITIONAL_MAVEN_OPTS="-Dit.test=**/*IT.java"
|
|
else
|
|
ADDITIONAL_MAVEN_OPTS=""
|
|
fi
|
|
|
|
if [ "${SKIP_DEPLOY}" = "true" ]; then
|
|
MAVEN_PHASE="verify"
|
|
fi
|
|
|
|
source "$(dirname "${BASH_SOURCE[0]}")/java_base_image_map.sh"
|
|
|
|
# Do not deploy snapshots for alfresco-transform-core, alfresco-transformer-base and alfresco-base-t-engine
|
|
mvn -B -U -Dmaven.wagon.http.pool=false \
|
|
clean ${MAVEN_PHASE} \
|
|
-DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true \
|
|
-Dparent.core.deploy.skip=true -Dtransformer.base.deploy.skip=true \
|
|
"-P${PROFILE},docker-it-setup,${1}" \
|
|
${ADDITIONAL_MAVEN_OPTS}
|
|
|
|
docker ps -a -q | xargs -r -l docker stop ; docker ps -a -q | xargs -r -l docker rm
|
|
|
|
popd
|
|
set +vex
|
|
echo "=========================== Finishing Test&Deploy Script =========================="
|