Skip to content

Commit

Permalink
CA-242451: Use a different location for binaries built with CTXSIGN d…
Browse files Browse the repository at this point in the history
…efined (the actual location will be updated when the build is available). Use latest dotnet-packages.

Signed-off-by: Konstantina Chremmou <[email protected]>
  • Loading branch information
kc284 committed Feb 17, 2017
1 parent f414407 commit c783e18
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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.*/
Expand Down
20 changes: 11 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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!
Expand Down
4 changes: 2 additions & 2 deletions devtools/download_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions mk/deps-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -51,4 +51,4 @@
"flat": "true"
}
]
}
}
2 changes: 1 addition & 1 deletion packages/DOTNET_BUILD_LOCATION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xc-local-build/dotnet-packages/trunk/745
xc-local-build/dotnet-packages/master/3
1 change: 1 addition & 0 deletions packages/DOTNET_BUILD_LOCATION_CTXSIGN
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xc-local-build/dotnet-packages/master/3

0 comments on commit c783e18

Please sign in to comment.