Skip to content

Commit

Permalink
Merge pull request #147 from mapaction/chore/jenkinsfile2
Browse files Browse the repository at this point in the history
Add in basic Jenkinfile. More sophisticated/interesting features can be enabled at a later date.
  • Loading branch information
andrewphilipsmith authored Mar 14, 2017
2 parents cfc1d2d + 6e472af commit 3a3d52f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env groovy

node {
ws ("workspace\\mapaction-toolbox\\${env.BUILD_NUMBER}") {

/*
properties{
PipelineTriggersJobProperty(triggers: [
PeriodicFolderTrigger(interval: 60),
SCMTrigger(scmpoll: 15)
])
*/

/*
properties [$class: 'PipelineTriggersJobProperty',
triggers: [
[$class: 'PeriodicFolderTrigger',
interval: '60'
],
[$class: 'SCMTrigger',
scmpoll: '15'
],
]
]
*/

timeout(time: 10, unit: 'MINUTES'){

stage('Build') {
echo 'Stage: Build'
checkout scm
// build sln
bat "\"${tool 'MSBuild v4.0.30319'}\" arcgis10_mapping_tools/MapAction-toolbox.sln /t:build /p:PlatformTarget=x86 /p:Configuration=Release /maxcpucount"
// copy the resultant esriAddIns to a common directory
bat 'arcgis10_mapping_tools\\arcaddins_for_testing\\post_build_copy_addins.cmd'
}
stage('Test') {
echo 'Stage: Test'
try{
bat 'arcgis10_mapping_tools\\run-unittests.cmd'
} catch (error) {
error 'some unittests failed'
} finally {
// publish nUnit results
step([$class: 'NUnitPublisher', testResultsPattern: 'TestResult.xml', debug: false, keepJUnitReports: true, skipJUnitArchiver:false, failIfNoResults: true])
// archieve the esriAddIns
archiveArtifacts 'arcgis10_mapping_tools/arcaddins_for_testing/*.esriAddIn'
}
}
stage('Deploy') {
echo 'deploying'
}
}
}
}

0 comments on commit 3a3d52f

Please sign in to comment.