-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from mapaction/chore/jenkinsfile2
Add in basic Jenkinfile. More sophisticated/interesting features can be enabled at a later date.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
} | ||
} | ||
} |