Skip to content
Permalink
Browse files
[JENKINS-26101] Should be able to load complete script from SCM now.
  • Loading branch information
jglick committed Jan 21, 2015
1 parent 641a349 commit 485c0ec6837c82795b0d438809ba286718c7784d
Showing with 13 additions and 15 deletions.
  1. +13 −15 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'
@@ -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) {

0 comments on commit 485c0ec

Please sign in to comment.