Skip to content

Commit e1201f1

Browse files
committed
Fix deploy
The build and the deploy were being done on separate nodes which was unnecessary and causing the .jar to not be found.
1 parent ef43acd commit e1201f1

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

Jenkinsfile

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,13 @@ def SUCCESS = hudson.model.Result.SUCCESS.toString()
99
currentBuild.result = SUCCESS
1010

1111
try {
12-
parallel check: {
13-
stage('Check') {
12+
build: {
13+
stage('Build') {
1414
node {
1515
checkout scm
1616
try {
1717
sh "./gradlew clean assemble check --no-daemon --stacktrace"
18-
} catch(Exception e) {
19-
currentBuild.result = 'FAILED: check'
20-
throw e
21-
} finally {
22-
junit '**/build/test-results/*/*.xml'
23-
}
24-
}
25-
}
26-
}
2718

28-
if(currentBuild.result == 'SUCCESS') {
29-
parallel deploy: {
30-
stage('Deploy Application') {
31-
node {
32-
checkout scm
3319
sh "./ci/scripts/install-cf.sh"
3420
withCredentials([usernamePassword(credentialsId: 'backportbot-cf', passwordVariable: 'CF_PASSWORD', usernameVariable: 'CF_USERNAME')]) {
3521
sh "./cf login -a api.run.pivotal.io -o FrameworksAndRuntimes -s rwinch -u '$CF_USERNAME' -p '$CF_PASSWORD'"
@@ -41,6 +27,11 @@ try {
4127
}
4228
}
4329
}
30+
} catch(Exception e) {
31+
currentBuild.result = 'FAILED: check'
32+
throw e
33+
} finally {
34+
junit '**/build/test-results/*/*.xml'
4435
}
4536
}
4637
}

ci/scripts/cf-push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ VENERABLE_APP_NAME="$APP_NAME-venerable"
1515
cf delete $VENERABLE_APP_NAME -f
1616
cf rename $APP_NAME $VENERABLE_APP_NAME
1717

18-
if cf push $APP_NAME -p build/libs/backport-bot-0.0.1-SNAPSHOT.jar $PUSH_ARGS ; then
18+
if cf push $APP_NAME -p build/libs/*.jar $PUSH_ARGS ; then
1919
# the app started successfully so remove venerable app
2020
cf delete $VENERABLE_APP_NAME -f
2121
else

0 commit comments

Comments
 (0)