2022-11-27 19:20:38 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'golang:latest'
|
|
|
|
label 'docker-build'
|
|
|
|
}
|
|
|
|
}
|
2022-11-27 19:30:02 +00:00
|
|
|
environment {
|
|
|
|
XDG_CACHE_HOME = '/tmp/.cache'
|
2022-11-28 01:40:41 +00:00
|
|
|
CGO_ENABLED = 0
|
2022-11-27 19:30:02 +00:00
|
|
|
}
|
2022-11-27 19:20:38 +00:00
|
|
|
stages {
|
|
|
|
stage('build') {
|
|
|
|
steps {
|
2023-03-02 13:59:40 +00:00
|
|
|
// mattermostSend "Build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
2022-11-27 19:20:38 +00:00
|
|
|
sh 'go build'
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success {
|
2023-03-02 13:59:40 +00:00
|
|
|
// mattermostSend color: "good", message: "Build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
2022-11-28 01:40:41 +00:00
|
|
|
archiveArtifacts artifacts: 'pnut-bridge'
|
|
|
|
}
|
2023-03-02 13:59:40 +00:00
|
|
|
// failure {
|
|
|
|
// mattermostSend color: "danger", message: "Build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
|
|
|
// }
|
2022-11-27 19:20:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|