added go to tools
Some checks failed
GiteaTest/JenkinsGoTest/pipeline/head There was a failure building this commit
Some checks failed
GiteaTest/JenkinsGoTest/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'golang' }
|
agent { label 'linux' }
|
||||||
|
tool name: 'Latest', type: 'go'
|
||||||
options {
|
options {
|
||||||
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
||||||
}
|
}
|
||||||
@@ -7,8 +8,7 @@ pipeline {
|
|||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
// Build SH script
|
// Build SH script
|
||||||
sh '''export PATH=$PATH:/usr/local/go/bin
|
sh '''go build -o "HelloWorld-amd64-$BUILD_DISPLAY_NAME"
|
||||||
go build -o "HelloWorld-amd64-$BUILD_DISPLAY_NAME"
|
|
||||||
cp HelloWorld-amd64-$BUILD_DISPLAY_NAME HelloWorld-amd64-Latest
|
cp HelloWorld-amd64-$BUILD_DISPLAY_NAME HelloWorld-amd64-Latest
|
||||||
'''
|
'''
|
||||||
// Archive Build file
|
// Archive Build file
|
||||||
|
|||||||
Reference in New Issue
Block a user