Do not retrieve dynamically, but rather specify explicitly, the version of .NET

to use. Use trunk as XS_BRANCH only where needed (some places will be obsoleted).

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2016-12-15 14:33:52 +00:00
parent 31c87eff7e
commit 0b74802e4f
4 changed files with 15 additions and 29 deletions

View File

@ -87,14 +87,8 @@ fi
XS_BRANCH=${GIT_LOCAL_BRANCH}
if [ -z "${XS_BRANCH+xxx}" ] ; then
echo "WARN: GIT_LOCAL_BRANCH env var not set, we will use trunk"
XS_BRANCH="trunk"
elif [ $(curl --output /dev/null -m 60 --silent http://hg.uk.xensource.com/git/carbon/${XS_BRANCH}/xenadmin.git; echo "$?") != 0 ] ; then
echo "Branch ${XS_BRANCH} not found on hg.uk/xenadmin. Reverting to trunk."
XS_BRANCH="trunk"
elif [ "${XS_BRANCH}" = "master" ] ; then
echo "INFO: found master branch; renaming to trunk."
XS_BRANCH="trunk"
XS_BRANCH=$($git rev-parse --abbrev-ref HEAD)
echo "WARN: GIT_LOCAL_BRANCH env var not set, using current head ${XS_BRANCH} instead"
fi
#rename Jenkins environment variables to distinguish them from ours; remember to use them as get only
@ -143,9 +137,11 @@ else
fi
#this is where the build will find stuff from the latest dotnet-packages build
WEB_DOTNET="${JENKINS_SERVER}/job/carbon_${XS_BRANCH}_dotnet-packages/lastSuccessfulBuild/artifact"
WEB_DOTNET=${REPO_CITRITE_HOST}/xc-local-build/dotnet-packages/trunk/745
DOTNET_BASE=${SECURE_BUILD_ARCHIVE_UNC}/carbon_${XS_BRANCH}_dotnet-packages
DOTNET_LOC=$DOTNET_BASE/$(ls $DOTNET_BASE | /usr/bin/sort -n | tail -n 1)
DOTNET_BASE_TRUNK=${SECURE_BUILD_ARCHIVE_UNC}/carbon_trunk_dotnet-packages
DOTNET_LOC=${DOTNET_BASE}/$(ls $DOTNET_BASE | /usr/bin/sort -n | tail -n 1)
DOTNET_LOC_TRUNK=${DOTNET_BASE_TRUNK}/$(ls $DOTNET_BASE_TRUNK | /usr/bin/sort -n | tail -n 1)
# used to copy results out of the secure build enclave
BUILD_TOOLS_REPO=git://hg.uk.xensource.com/closed/windows/buildtools.git
@ -154,8 +150,6 @@ STORE_FILES=${BUILD_TOOLS}/scripts/storefiles.py
# this is where the build will find the RPU hotfixes
WEB_HOTFIXES_ROOT=${REPO_CITRITE_HOST}/builds/xs/hotfixes
WEB_HOTFIXES=${WEB_HOTFIXES_ROOT}/${XS_BRANCH}/
WEB_HOTFIXES_TRUNK=${WEB_HOTFIXES_ROOT}/trunk/
WGET_OPT="-T 10 -N -q"
WGET () { wget ${WGET_OPT} "${@}"; }

View File

@ -34,9 +34,6 @@ set -u
source "$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/declarations.sh"
#if [ ${XS_BRANCH} = "trunk" ]
#then
echo -n "Starting tests at "
date
@ -95,7 +92,3 @@ echo -n "Tests succeeded at "
date
set +u
#else
#echo "Tests skipped because this is not trunk"
#fi

View File

@ -53,7 +53,12 @@ mkdir_clean ${BUILD_ARCHIVE}
rm -rf ${TEST_DIR}/* ${XENCENTER_LOGDIR}/*.log || true
#create manifest
echo "@branch=${XS_BRANCH}" >> ${OUTPUT_DIR}/manifest
if [ ${XS_BRANCH} = "master" ] ; then
echo "@branch=trunk" >> ${OUTPUT_DIR}/manifest
else
echo "@branch=${XS_BRANCH}" >> ${OUTPUT_DIR}/manifest
fi
echo "xenadmin xenadmin.git ${get_REVISION:0:12}" >> ${OUTPUT_DIR}/manifest
rm -rf ${ROOT}/xenadmin-branding.git
@ -110,7 +115,7 @@ dotnet_cp_to_dir ()
local -r src="${1}"; shift
if [ "${BUILD_KIND:+$BUILD_KIND}" = production ]
then
cp "${DOTNET_LOC}/${src}" "${destdir}/"
cp "${DOTNET_LOC}/${src}" "${destdir}/" || cp "${DOTNET_LOC_TRUNK}/${src}" "${destdir}/"
else
_WGET -P "${destdir}" "${WEB_DOTNET}/${src}"
fi
@ -122,7 +127,7 @@ dotnet_cp_file ()
local -r dest="${1}"; shift
if [ "${BUILD_KIND:+$BUILD_KIND}" = production ]
then
cp "${DOTNET_LOC}/${src}" "${dest}"
cp "${DOTNET_LOC}/${src}" "${dest}" || cp "${DOTNET_LOC_TRUNK}/${src}" "${dest}"
else
_WGET -O "${dest}" "${WEB_DOTNET}/${src}"
fi
@ -155,7 +160,7 @@ source ${REPO}/mk/re-branding.sh
function get_hotfixes ()
{
local -r p="$1"
_WGET -L -np -nH -r --cut-dirs 4 -R index.html -P ${p} ${WEB_HOTFIXES} || _WGET -L -np -nH -r --cut-dirs 4 -R index.html -P ${p} ${WEB_HOTFIXES_TRUNK}
_WGET -L -np -nH -r --cut-dirs 4 -R index.html -P ${p} ${WEB_HOTFIXES_ROOT}/${XS_BRANCH}/ || _WGET -L -np -nH -r --cut-dirs 4 -R index.html -P ${p} ${WEB_HOTFIXES_ROOT}/trunk/
}
#bring RPU hotfixes

View File

@ -32,11 +32,8 @@
set -eu
source "$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/declarations.sh"
source ${REPO}/Branding/branding.sh
if [ ${XS_BRANCH} = "trunk" ]
then
echo -n "Starting tests at "
date
@ -74,6 +71,3 @@ ${MYSCP} Administrator@$ADDR:/tmp/XenAdminTests.xml /var/www/XenAdminTests.xml
grep 'errors="0" failures="0"' /var/www/XenAdminTests.xml
else
echo "Warning: Tests skipped in this configuration."
fi