storj/Jenkinsfile

52 lines
949 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:11:30 +01:00
def root = tool name: 'Go 1.10', 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
2018-04-26 14:04:15 +01:00
withEnv(["GOROOT=${root}", "PATH+GO=${root}/bin", "PATH=$PATH:${root}/bin"]) {
2018-04-25 19:29:31 +01:00
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-26 14:04:15 +01:00
echo "path="
echo $PATH
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
*/
}
}