From c783e1845084aedf1655193ac83d2f1d92176671 Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Fri, 17 Feb 2017 17:01:10 +0000 Subject: [PATCH] CA-242451: Use a different location for binaries built with CTXSIGN defined (the actual location will be updated when the build is available). Use latest dotnet-packages. Signed-off-by: Konstantina Chremmou --- .gitignore | 2 ++ Jenkinsfile | 20 +++++++++++--------- devtools/download_packages.sh | 4 ++-- mk/deps-map.json | 10 +++++----- packages/DOTNET_BUILD_LOCATION | 2 +- packages/DOTNET_BUILD_LOCATION_CTXSIGN | 1 + 6 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 packages/DOTNET_BUILD_LOCATION_CTXSIGN diff --git a/.gitignore b/.gitignore index 30cd6895e4..f6912ffeee 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ WixInstaller/XenCenter.l10n.wxs dotNetInstaller/* dotNetFx40_Full_setup/* packages/* +!packages/DOTNET_BUILD_LOCATION +!packages/DOTNET_BUILD_LOCATION_CTXSIGN XenOvfApi/External Tools/* _ReSharper.*/ diff --git a/Jenkinsfile b/Jenkinsfile index 91cbb931f0..5b285fbc35 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -170,9 +170,19 @@ node("${params.BUILD_ON_NODE}") { } } + def CTX_SIGN_DEFINED = bat( + returnStdout: true, + script: """ + @echo off + if defined c (echo 1) else (echo 0) + """ + ).trim() + stage('Download dependencies') { + GString dotNetFile = (CTX_SIGN_DEFINED == '1') ? 'DOTNET_BUILD_LOCATION_CTXSIGN' : 'DOTNET_BUILD_LOCATION' + GString remoteDotnet = GString.EMPTY - remoteDotnet += readFile("${env.WORKSPACE}\\xenadmin.git\\packages\\DOTNET_BUILD_LOCATION").trim() + remoteDotnet += readFile("${env.WORKSPACE}\\xenadmin.git\\packages\\${dotNetFile}").trim() GString downloadSpec = GString.EMPTY downloadSpec += readFile("${env.WORKSPACE}\\xenadmin.git\\mk\\deps-map.json").trim().replaceAll("@REMOTE_DOTNET@", remoteDotnet) @@ -327,14 +337,6 @@ node("${params.BUILD_ON_NODE}") { GString artifactMeta = "build.name=${env.JOB_NAME};build.number=${env.BUILD_NUMBER};vcs.url=${env.CHANGE_URL};vcs.branch=${params.XC_BRANCH};vcs.revision=${GIT_COMMIT_XENADMIN}" - def CTX_SIGN_DEFINED = bat( - returnStdout: true, - script: """ - @echo off - if defined CTXSIGN (echo 1) else (echo 0) - """ - ).trim() - String targetSubRepo = (CTX_SIGN_DEFINED == '1') ? 'xenadmin-ctxsign' : 'xenadmin' // IMPORTANT: do not forget the slash at the end of the target path! diff --git a/devtools/download_packages.sh b/devtools/download_packages.sh index 0c98a5c277..c4544b2789 100644 --- a/devtools/download_packages.sh +++ b/devtools/download_packages.sh @@ -44,11 +44,11 @@ SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]})/../packages && pwd) #dotnet packages BUILD_LOCATION=$(cat ${SCRIPT_DIR}/DOTNET_BUILD_LOCATION) -DOTNET="https://${DOMAIN}/api/archive/download/${BUILD_LOCATION}/UNSIGNED?archiveType=zip" +DOTNET="https://${DOMAIN}/api/archive/download/${BUILD_LOCATION}/dotnet46?archiveType=zip" ZIP=dotnetpackages.zip curl --fail -u ${USERNAME}:${PASSWORD} ${DOTNET} -o ${SCRIPT_DIR}/${ZIP} -unzip ${SCRIPT_DIR}/${ZIP} -d ${SCRIPT_DIR} "*.dll" "putty.exe" +unzip -o ${SCRIPT_DIR}/${ZIP} -d ${SCRIPT_DIR} "*.dll" "putty.exe" rm -f ${SCRIPT_DIR}/${ZIP} #unit test dependencies diff --git a/mk/deps-map.json b/mk/deps-map.json index f021dd6295..e6d82e8fa6 100644 --- a/mk/deps-map.json +++ b/mk/deps-map.json @@ -11,22 +11,22 @@ "flat": "true" }, { - "pattern": "@REMOTE_DOTNET@/putty.exe", + "pattern": "@REMOTE_DOTNET@/dotnet46/putty.exe", "target": "xenadmin.git/packages/", "flat": "true" }, { - "pattern": "@REMOTE_DOTNET@/NDP46-KB3045560-Web.exe", + "pattern": "@REMOTE_DOTNET@/dotnet46/NDP46-KB3045560-Web.exe", "target": "xenadmin.git/dotNetInstaller/", "flat": "true" }, { - "pattern": "@REMOTE_DOTNET@/UNSIGNED/*.dll", + "pattern": "@REMOTE_DOTNET@/dotnet46/*.dll", "target": "xenadmin.git/packages/", "flat": "true" }, { - "pattern": "@REMOTE_DOTNET@/*.pdb", + "pattern": "@REMOTE_DOTNET@/dotnet46/*.pdb", "target": "output/", "flat": "true" }, @@ -51,4 +51,4 @@ "flat": "true" } ] -} \ No newline at end of file +} diff --git a/packages/DOTNET_BUILD_LOCATION b/packages/DOTNET_BUILD_LOCATION index fb7b3298d3..87e1b46881 100644 --- a/packages/DOTNET_BUILD_LOCATION +++ b/packages/DOTNET_BUILD_LOCATION @@ -1 +1 @@ -xc-local-build/dotnet-packages/trunk/745 +xc-local-build/dotnet-packages/master/3 diff --git a/packages/DOTNET_BUILD_LOCATION_CTXSIGN b/packages/DOTNET_BUILD_LOCATION_CTXSIGN new file mode 100644 index 0000000000..87e1b46881 --- /dev/null +++ b/packages/DOTNET_BUILD_LOCATION_CTXSIGN @@ -0,0 +1 @@ +xc-local-build/dotnet-packages/master/3