0a78e741ec
* First pass at building binaries * Finished building images * Reworked some bits to save binaries in a better place. * First pass at uploading binaries * Builds for freebsd fail currently * Add ignore file for docker builds to not invalidate the cache as often * Docker image for 1.11-alpine exists now * Name windows binaries correctly * The makefile is used in tests. * Take a swing at updating the tests for 1.11 * Switch to something with glibc so the race detector works. * Remove unused .PHONY targets
67 lines
1.3 KiB
Groovy
67 lines
1.3 KiB
Groovy
node('node') {
|
|
try {
|
|
currentBuild.result = "SUCCESS"
|
|
|
|
stage('Checkout') {
|
|
checkout scm
|
|
|
|
echo "Current build result: ${currentBuild.result}"
|
|
}
|
|
|
|
stage('Build Images') {
|
|
sh 'make test-docker images'
|
|
|
|
echo "Current build result: ${currentBuild.result}"
|
|
}
|
|
|
|
stage('Build Binaries') {
|
|
sh 'make binaries'
|
|
|
|
echo "Current build result: ${currentBuild.result}"
|
|
}
|
|
|
|
stage('Push Images') {
|
|
if (env.BRANCH_NAME == "master") {
|
|
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') {
|
|
sh 'make deploy'
|
|
sh 'make binaries-upload'
|
|
echo "Current build result: ${currentBuild.result}"
|
|
}
|
|
}
|
|
|
|
}
|
|
catch (err) {
|
|
echo "Caught errors! ${err}"
|
|
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}"
|
|
|
|
throw err
|
|
*/
|
|
|
|
}
|
|
finally {
|
|
|
|
stage('Cleanup') {
|
|
sh 'make test-docker-clean clean-images'
|
|
deleteDir()
|
|
}
|
|
|
|
}
|
|
}
|