All checks were successful
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good
25 lines
1.4 KiB
Plaintext
25 lines
1.4 KiB
Plaintext
pipeline {
|
|
agent { label 'golang' }
|
|
options {
|
|
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
|
|
}
|
|
stages {
|
|
stage('Build') {
|
|
steps {
|
|
// Build SH script
|
|
sh '''export PATH=$PATH:/usr/local/go/bin
|
|
go build -o "HelloWorld-amd64$BUILD_DISPLAY_NAME"'''
|
|
// Archive Build file
|
|
// Local
|
|
archiveArtifacts artifacts: 'HelloWorld-amd64*', onlyIfSuccessful: true
|
|
//Remote sftp server
|
|
sshPublisher(publishers: [sshPublisherDesc(configName: 'centnas', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/$JOB_NAME', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'HelloWorld-amd64*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
|
|
// Cleaning WorkSpace
|
|
cleanWs()
|
|
// send Mail
|
|
//Send To person to make commit emailext body: '$DEFAULT_CONTENT', recipientProviders: [culprits()], subject: '$DEFAULT_SUBJECT', to: 'bramm.p11@gmail.com'
|
|
//Send To static addres emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'bramm.p11@gmail.com'
|
|
}
|
|
}
|
|
}
|
|
} |