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