REPO-5111 Update build scripts [skip ci]

This commit is contained in:
Cezar.Leahu
2020-09-30 22:28:11 +03:00
parent c3f9603772
commit b467a1b62e
5 changed files with 84 additions and 26 deletions

View File

@@ -1,9 +1,23 @@
#!/usr/bin/env bash
set -ev
echo "=========================== Starting Build Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
PROFILES="$([ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] && echo "-Pinternal" || echo "-PcommunityDocker" )"
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
if isBranchBuild && [ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] ; then
# update ":latest" image tags on remote repositories by using the maven *internal* profile
PROFILES="-Pinternal"
else
# build the ":latest" image tags locally with the maven *communityDocker* profile
PROFILES="-PcommunityDocker"
fi
mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true "${PROFILES}"
popd
set +vex
echo "=========================== Finishing Build Script =========================="