if echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then
GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$')
export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}"
- if [ "$BRANCH" == 'master' ]; then
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
# build rpm
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms"
else
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY"
elif [ "$ARTIFACT_VERSION" == "daily" ]; then
export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d")
- if [ "$BRANCH" == 'master' ]; then
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms"
else
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso"
fi
else
export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION}
- if [ "$BRANCH" == 'master' ]; then
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms"
else
export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso"
echo "-------------------------"
ls -al $CACHE_DIRECTORY
-if [[ "$BUILD_ARGS" =~ '--iso' && "$BRANCH" != 'master' ]]; then
+if [[ "$BUILD_ARGS" =~ '--iso' && "$BRANCH" == 'stable/fraser' ]]; then
mkdir -p /tmp/apex-iso/
rm -f /tmp/apex-iso/*.iso
cp -f $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso /tmp/apex-iso/
# we want to use that built in mechanism to avoid re-downloading every job
# so we use a dedicated folder to hold the upstream cache
UPSTREAM_CACHE=$HOME/upstream_cache
- if [ "$BRANCH" == 'master' ]; then
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
mkdir -p ${UPSTREAM_CACHE}
RESOURCES=$UPSTREAM_CACHE
else
# set to use different directory here because upon RPM removal this
# directory will be wiped in daily
UPSTREAM_CACHE=$HOME/upstream_cache
- if [ "$BRANCH" == 'master' ]; then
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
mkdir -p ${UPSTREAM_CACHE}
RESOURCES=$UPSTREAM_CACHE
else
DEPLOY_CMD="${DEPLOY_CMD} -i ${INVENTORY_FILE}"
fi
-if [[ "$BRANCH" == "master" ]]; then
- echo "Upstream deployment detected"
- DEPLOY_CMD="${DEPLOY_CMD} --upstream"
-fi
-
if [ "$IPV6_FLAG" == "True" ]; then
NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml"
elif [[ "$PROMOTE" == "True" ]]; then
fi
if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
- if [ "$BRANCH" == 'master' ]; then
- echo "Skipping download of artifacts for master branch"
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
+ echo "Skipping download of artifacts for master/gambia branch"
else
# dev build
GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$')
echo "--------------------------------------------------------"
echo
-if [ "$BRANCH" == 'master' ]; then
- echo "Skipping Apex iso verify for master branch"
+if [ "$BRANCH" != 'stable/fraser' ]; then
+ echo "Skipping Apex iso verify for ${BRANCH} branch"
exit 0
fi
if [ "$ARTIFACT_TYPE" == 'snapshot' ]; then
uploadsnap
elif [ "$ARTIFACT_TYPE" == 'iso' ]; then
- if [[ "$ARTIFACT_VERSION" =~ dev || "$BRANCH" == 'master' ]]; then
- echo "Skipping ISO artifact upload for ${ARTIFACT_TYPE} due to dev/master build"
+ if [[ "$ARTIFACT_VERSION" =~ dev || "$BRANCH" != 'stable/fraser' ]]; then
+ echo "Skipping ISO artifact upload for ${ARTIFACT_TYPE} due to dev/${BRANCH} build"
exit 0
fi
if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then
uploadiso
elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then
if [[ "$ARTIFACT_VERSION" =~ dev ]]; then
- if [ "$BRANCH" == 'master' ]; then
- echo "will not upload artifacts, master uses upstream"
+ if [[ "$BRANCH" != 'stable/fraser' ]]; then
+ echo "will not upload artifacts, ${BRANCH} uses upstream"
ARTIFACT_TYPE=none
else
echo "dev build detected, will upload image tarball"
RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL)
SRPM_INSTALL_PATH=$BUILD_DIRECTORY
SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL)
- if [ "$BRANCH" != 'master' ]; then
+ if [[ "$BRANCH" == 'stable/fraser' ]]; then
VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//')
RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-undercloud-${VERSION_EXTENSION}"
RPM_LIST+=" ${RPM_INSTALL_PATH}/python34-opnfv-apex-${VERSION_EXTENSION}"