Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #854 from LiskHQ/853-test-deployments-github-status
Browse files Browse the repository at this point in the history
Deploy after build stage and notify GitHub - Closes #853
  • Loading branch information
fchavant authored Oct 11, 2017
2 parents 516a711 + d61f534 commit 8bc1ac2
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ node('lisk-nano') {
}
}

stage ('Deploy') {
try {
sh 'rsync -axl --delete --rsync-path="mkdir -p /var/www/test/lisk-nano/$BRANCH_NAME/ && rsync" $WORKSPACE/app/dist/ jenkins@master-01:/var/www/test/lisk-nano/$BRANCH_NAME/'
githubNotify context: 'Jenkins test deployment', description: 'Commit was deployed to test', status: 'SUCCESS', targetUrl: "${HUDSON_URL}test/lisk-nano/${BRANCH_NAME}"
} catch (err) {
echo "Error: ${err}"
fail('Stopping build: deploy failed')
}
}

stage ('Run Unit Tests') {
try {
ansiColor('xterm') {
Expand Down Expand Up @@ -111,15 +121,6 @@ node('lisk-nano') {
fail('Stopping build: end-to-end test suite failed')
}
}

stage ('Deploy') {
try {
sh 'rsync -axl --delete --rsync-path="mkdir -p /var/www/test/lisk-nano/$BRANCH_NAME/ && rsync" $WORKSPACE/app/dist/ jenkins@master-01:/var/www/test/lisk-nano/$BRANCH_NAME/'
} catch (err) {
echo "Error: ${err}"
fail('Stopping build: deploy failed')
}
}
} catch(err) {
echo "Error: ${err}"
} finally {
Expand Down

0 comments on commit 8bc1ac2

Please sign in to comment.