Files
alfresco-community-repo/scripts/setUpMavenPhase.sh
ehardon afbbaee5fc Split release stage into community and enterprise release and publish stages
- copy artifacts from maven for publish job
- simplify scripts
2020-10-20 15:17:08 +03:00

29 lines
823 B
Bash

#!/usr/bin/env bash
echo "Branch name: ${TRAVIS_BRANCH}"
echo "Pull request: ${TRAVIS_PULL_REQUEST}"
echo "Travis job name: ${TRAVIS_JOB_NAME}"
branchName=${TRAVIS_BRANCH}
imageTag=${branchName:8}
echo "Image tag: ${imageTag}"
if [[ ${TRAVIS_JOB_NAME} == "Build AGS Enterprise" ]];
then
export BUILD_PROFILE="internal"
else
export BUILD_PROFILE="master"
fi
if [[ "${TRAVIS_BRANCH}" == "master" && "${TRAVIS_PULL_REQUEST}" == "false" ]];
then
export MAVEN_PHASE="deploy"
export IMAGE_TAG="latest"
elif [[ ${TRAVIS_BRANCH} = release* && "${TRAVIS_PULL_REQUEST}" == "false" ]];
then
export MAVEN_PHASE="deploy"
export IMAGE_TAG="${imageTag}-latest"
else
export MAVEN_PHASE="verify"
export BUILD_PROFILE="buildDockerImage"
export IMAGE_TAG="latest"
fi