You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							973 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							973 B
						
					
					
				
								podTemplate {
							 | 
						|
								    node('pod-templ-jenkins-slave-golang') {
							 | 
						|
								
							 | 
						|
										env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${LOCAL}/${JOB_NAME}"
							 | 
						|
										env.IMAGE_NAME_SHORT = "${LOCAL}/${JOB_NAME}"
							 | 
						|
										env.CODE_ADDR = "https://gitea.anxinyun.cn/lucas2/goInOut.git"
							 | 
						|
								
							 | 
						|
									    stage('Run shell') {
							 | 
						|
										    git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}"
							 | 
						|
								
							 | 
						|
								            container('golang-builder-1-23') {
							 | 
						|
								                            sh'''
							 | 
						|
								                                    go env -w GOPROXY=https://goproxy.cn,direct
							 | 
						|
								                                    go env -w GO111MODULE=on
							 | 
						|
								                    CGO_ENABLED=0 GOOS=windows go build -ldflags "-extldflags -static "  -a -v -o app.exe main.go
							 | 
						|
								                    tar -cvf out.tar *.exe configFiles/
							 | 
						|
								                            '''
							 | 
						|
								            }
							 | 
						|
								            archiveArtifacts artifacts: 'out.tar', followSymlinks: false
							 | 
						|
										    buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}"
							 | 
						|
										    buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}"
							 | 
						|
										}
							 | 
						|
									}
							 | 
						|
								}
							 |