Ensure the same branch is used for common build
Only the master branch is used today, but be ready when there are additional branches Change-Id: I4a18a7bffc2a351759fc0f17b7df25368a0c6d01
This commit is contained in:
parent
33d3623f1a
commit
b1d6f715a0
@ -4,6 +4,7 @@ ME=`whoami`
|
|||||||
echo "Running as user: $ME"
|
echo "Running as user: $ME"
|
||||||
MVN=$1
|
MVN=$1
|
||||||
VERSION=$2
|
VERSION=$2
|
||||||
|
BRANCH=$3
|
||||||
|
|
||||||
check_user() {
|
check_user() {
|
||||||
ME=$1
|
ME=$1
|
||||||
@ -22,7 +23,7 @@ fi
|
|||||||
|
|
||||||
# This should only be done on the stack forge system
|
# This should only be done on the stack forge system
|
||||||
if [ "${BUILD_COMMON}" = "true" ]; then
|
if [ "${BUILD_COMMON}" = "true" ]; then
|
||||||
git clone https://git.openstack.org/openstack/monasca-common
|
git clone -b ${BRANCH} https://git.openstack.org/openstack/monasca-common
|
||||||
cd monasca-common
|
cd monasca-common
|
||||||
${MVN} clean
|
${MVN} clean
|
||||||
${MVN} install
|
${MVN} install
|
||||||
|
11
run_maven.sh
11
run_maven.sh
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
set -x
|
||||||
|
env
|
||||||
# Download maven 3 if the system maven isn't maven 3
|
# Download maven 3 if the system maven isn't maven 3
|
||||||
VERSION=`mvn -v | grep "Apache Maven 3"`
|
VERSION=`mvn -v | grep "Apache Maven 3"`
|
||||||
if [ -z "${VERSION}" ]; then
|
if [ -z "${VERSION}" ]; then
|
||||||
@ -29,7 +30,13 @@ for ARG in $*; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ $RUN_BUILD = "true" ]; then
|
if [ $RUN_BUILD = "true" ]; then
|
||||||
( cd common; ./build_common.sh ${MVN} ${COMMON_VERSION} )
|
if [ ! -z "$ZUUL_BRANCH" ]; then
|
||||||
|
BRANCH=${ZUUL_BRANCH}
|
||||||
|
else
|
||||||
|
BRANCH=${ZUUL_REF}
|
||||||
|
fi
|
||||||
|
|
||||||
|
( cd common; ./build_common.sh ${MVN} ${COMMON_VERSION} ${BRANCH} )
|
||||||
RC=$?
|
RC=$?
|
||||||
if [ $RC != 0 ]; then
|
if [ $RC != 0 ]; then
|
||||||
exit $RC
|
exit $RC
|
||||||
@ -37,7 +44,7 @@ if [ $RUN_BUILD = "true" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Invoke the maven 3 on the real pom.xml
|
# Invoke the maven 3 on the real pom.xml
|
||||||
( cd java; ${MVN} -DgitRevision=`git rev-list HEAD --max-count 1 --abbrev=0 --abbrev-commit` $* )
|
( cd java; ${MVN} -DgitRevision=`git rev-list HEAD --max-count 1 --abbrev=0 --abbrev-commit` $* )
|
||||||
|
|
||||||
RC=$?
|
RC=$?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user