storj/Jenkinsfile

50 lines
885 B
Plaintext
Raw Normal View History

2018-04-25 19:04:12 +01:00
node('node') {
2018-04-25 19:29:31 +01:00
// Install the desired Go version
2018-04-25 20:10:14 +01:00
def root = tool name: 'go 1.10.1', type: 'go'
2018-04-25 20:08:26 +01:00
2018-04-25 19:29:31 +01:00
// Export environment variables pointing to the directory where Go was installed
withEnv(["GOROOT=${root}", "PATH+GO=${root}/bin"]) {
sh 'go version'
}
2018-04-25 19:04:12 +01:00
try {
stage 'Checkout'
checkout scm
stage 'Test'
sh """#!/bin/bash -e
2018-04-25 20:08:26 +01:00
echo $root
2018-04-25 19:04:12 +01:00
make build-dev-deps lint
"""
stage 'Build Docker'
echo 'Build'
stage 'Deploy'
echo 'Deploy'
stage 'Cleanup'
echo 'prune and cleanup'
}
catch (err) {
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
*/
}
}