Handle release builds and email status (#361)

* Handle release builds and email status to a list.

* Tested jenkinsfile
This commit is contained in:
Matt Robinson 2018-09-18 09:46:04 -04:00 committed by GitHub
parent b6b6111173
commit 89fafd01d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

26
Jenkinsfile vendored
View File

@ -21,22 +21,22 @@ node('node') {
}
stage('Push Images') {
if (env.BRANCH_NAME == "master") {
echo 'Push to Repo'
sh 'make push-images'
}
echo 'Push to Repo'
sh 'make push-images'
echo "Current build result: ${currentBuild.result}"
}
if (env.BRANCH_NAME == "master") {
/* This should only deploy to staging if the branch is master */
stage('Deploy') {
stage('Deploy to staging') {
sh 'make deploy'
sh 'make binaries-upload'
echo "Current build result: ${currentBuild.result}"
}
}
stage('Upload') {
sh 'make binaries-upload'
echo "Current build result: ${currentBuild.result}"
}
}
catch (err) {
@ -44,15 +44,13 @@ node('node') {
echo "Setting build result to FAILURE"
currentBuild.result = "FAILURE"
/*
mail body: "project build error is here: ${env.BUILD_URL}" ,
from: 'build@storj.io',
replyTo: 'build@storj.io',
subject: 'project build failed',
to: "${env.CHANGE_AUTHOR_EMAIL}"
mail from: 'builds@storj.io',
replyTo: 'builds@storj.io',
to: 'builds@storj.io',
subject: "storj/storj branch ${env.BRANCH_NAME} build failed",
body: "Project build log: ${env.BUILD_URL}"
throw err
*/
}
finally {