Skip to content

Commit

Permalink
[JENKINS-26101] Should be able to load complete script from SCM now.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Jan 21, 2015
1 parent 641a349 commit 485c0ec
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions flow.groovy
@@ -1,4 +1,4 @@
def devQAStaging() {
node('slave') {
env.PATH="${tool 'Maven 3.x'}/bin:${env.PATH}"
stage 'Dev'
sh 'mvn -o clean package'
Expand All @@ -19,20 +19,18 @@ def devQAStaging() {
deploy 'target/x.war', 'staging'
}

def production() {
input message: "Does http://localhost:8080/staging/ look good?"
try {
checkpoint('Before production')
} catch (NoSuchMethodError _) {
echo 'Checkpoint feature available in Jenkins Enterprise by CloudBees.'
}
stage name: 'Production', concurrency: 1
node('master') {
sh 'curl -I http://localhost:8080/staging/'
unarchive mapping: ['target/x.war' : 'x.war']
deploy 'x.war', 'production'
echo 'Deployed to http://localhost:8080/production/'
}
input message: "Does http://localhost:8080/staging/ look good?"
try {
checkpoint('Before production')
} catch (NoSuchMethodError _) {
echo 'Checkpoint feature available in Jenkins Enterprise by CloudBees.'
}
stage name: 'Production', concurrency: 1
node('master') {
sh 'curl -I http://localhost:8080/staging/'
unarchive mapping: ['target/x.war' : 'x.war']
deploy 'x.war', 'production'
echo 'Deployed to http://localhost:8080/production/'
}

def deploy(war, id) {
Expand Down

0 comments on commit 485c0ec

Please sign in to comment.