2 Commits

Author SHA1 Message Date
60cf96c80f Update 'main.go'
All checks were successful
GiteaTest/JenkinsGoTest/pipeline/pr-master This commit looks good
2021-01-05 04:19:48 +00:00
033df5f171 Update 'main.go'
Some checks failed
GiteaTest/JenkinsGoTest/pipeline/pr-master There was a failure building this commit
2021-01-05 04:18:50 +00:00
2 changed files with 4 additions and 6 deletions

View File

@@ -1,8 +1,5 @@
pipeline { pipeline {
agent { label 'linux' } agent { label 'golang' }
tools {
go 'Latest'
}
options { options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10')) buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
} }
@@ -10,7 +7,8 @@ pipeline {
stage('Build') { stage('Build') {
steps { steps {
// Build SH script // Build SH script
sh '''go build -o "HelloWorld-amd64-$BUILD_DISPLAY_NAME" sh '''export PATH=$PATH:/usr/local/go/bin
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

View File

@@ -9,5 +9,5 @@ func main() {
fmt.Println("This nice missing end, Fixed it") fmt.Println("This nice missing end, Fixed it")
fmt.Println("Added on new branch") fmt.Println("Added on new branch")
fmt.Println("Added on new branch main") fmt.Println("Added on new branch main")
fmt.Println("Update counter 2") fmt.Println("Pull requestTest")
} }