Skip to content

Commit

Permalink
Merge pull request #812 from ramarag/fututre_shoulbe_2017
Browse files Browse the repository at this point in the history
Future should use VS 2017
  • Loading branch information
ramarag authored Feb 4, 2017
2 parents 6929f00 + fc6c001 commit acf87a3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if "%ERRORLEVEL%" == "0" (
goto :SkipDeveloperSetup
)

set DeveloperCommandPrompt=%VS140COMNTOOLS%\VsDevCmd.bat
set DeveloperCommandPrompt=%VS150COMNTOOLS%\VsDevCmd.bat

if not exist "%DeveloperCommandPrompt%" (
echo In order to build this repository, you either need 'msbuild' on the path or Visual Studio 2015 installed.
Expand Down
26 changes: 19 additions & 7 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

// Import the utility functionality.

import jobs.generation.ArchivalSettings;
import jobs.generation.Utilities;
import jobs.generation.InternalUtilities;

def project = GithubProject
def branch = GithubBranchName
def isPR = true

def osList = ['Windows_NT', 'Ubuntu14.04']
def osList = ['Windows_NT', 'Windows_NT_FullFramework', 'Ubuntu14.04']
def configList = ['Release', 'Debug']

def static getBuildJobName(def configuration, def os) {
Expand All @@ -23,9 +23,17 @@ osList.each { os ->
def jobName = getBuildJobName(config, os)
def buildCommand = '';

def osBase = os
def machineAffinity = 'latest-or-auto'

// Calculate the build command
if (os == 'Windows_NT') {
buildCommand = ".\\build.cmd -Configuration $config"
machineAffinity = 'latest-or-auto-dev15-rc'
} else if (os == 'Windows_NT_FullFramework') {
buildCommand = ".\\build.cmd -Configuration $config -FullMSBuild"
osBase = 'Windows_NT'
machineAffinity = 'latest-or-auto-dev15-rc'
} else {
// Jenkins non-Ubuntu CI machines don't have docker
buildCommand = "./build.sh --configuration $config"
Expand All @@ -34,11 +42,9 @@ osList.each { os ->
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
// Set the label.
steps {
if (os == 'Windows_NT') {
if (osBase == 'Windows_NT') {
// Batch
batchFile("""SET VS150COMNTOOLS=%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\
SET VSSDK150Install=%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Enterprise\\VSSDK\\
SET VSSDKInstall=%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Enterprise\\VSSDK\\
${buildCommand}""")
}
else {
Expand All @@ -48,8 +54,14 @@ ${buildCommand}""")
}
}

Utilities.setMachineAffinity(newJob, os, 'latest-or-auto-internal')
InternalUtilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
def archiveSettings = new ArchivalSettings()
archiveSettings.addFiles("bin/**/*")
archiveSettings.excludeFiles("bin/obj/*")
archiveSettings.setFailIfNothingArchived()
archiveSettings.setArchiveOnFailure()
Utilities.addArchival(newJob, archiveSettings)
Utilities.setMachineAffinity(newJob, osBase, machineAffinity)
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
Utilities.addXUnitDotNETResults(newJob, "bin/$config/Tests/TestResults.xml", false)
Utilities.addGithubPRTriggerForBranch(newJob, branch, "$os $config")
}
Expand Down

0 comments on commit acf87a3

Please sign in to comment.