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

Deploy after build stage and notify GitHub - Closes #853 #854

Merged
merged 2 commits into from
Oct 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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