Correcting for Jenkinsfile "stage" syntax warning

The Warning Message:

   "Using the 'stage' step without a block argument is deprecated"
This commit is contained in:
Joakim Erdfelt 2016-10-20 11:29:24 -07:00
parent b8127399d7
commit bb0ac62328
1 changed files with 38 additions and 34 deletions

12
Jenkinsfile vendored
View File

@ -11,8 +11,9 @@ node('linux') {
try
{
stage 'Checkout'
stage('Checkout') {
checkout scm
}
} catch (Exception e) {
notifyBuild("Checkout Failure")
throw e
@ -20,12 +21,13 @@ node('linux') {
try
{
stage 'Compile'
stage('Compile') {
withEnv(mvnEnv) {
timeout(time: 15, unit: 'MINUTES') {
sh "mvn -B clean install -Dtest=None"
}
}
}
} catch(Exception e) {
notifyBuild("Compile Failure")
throw e
@ -33,12 +35,13 @@ node('linux') {
try
{
stage 'Javadoc'
stage('Javadoc') {
withEnv(mvnEnv) {
timeout(time: 15, unit: 'MINUTES') {
sh "mvn -B javadoc:javadoc"
}
}
}
} catch(Exception e) {
notifyBuild("Javadoc Failure")
throw e
@ -46,7 +49,7 @@ node('linux') {
try
{
stage 'Test'
stage('Test') {
withEnv(mvnEnv) {
timeout(time: 60, unit: 'MINUTES') {
// Run test phase / ignore test failures
@ -72,6 +75,7 @@ node('linux') {
notifyBuild("Unstable / Test Errors")
}
}
}
} catch(Exception e) {
notifyBuild("Test Failure")
throw e