2 Commits

Author SHA1 Message Date
brammp 67565c6d63 Update 'main.go'
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good
2021-01-05 04:11:34 +00:00
brammp cd9c307d06 release
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good
Testr
2021-01-05 04:02:26 +00:00
2 changed files with 5 additions and 7 deletions
+3 -5
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
+2 -2
View File
@@ -8,6 +8,6 @@ func main() {
fmt.Println("See if this stiks") fmt.Println("See if this stiks")
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 Rel")
fmt.Println("Update counter 2") fmt.Println("Update counter rel1")
} }