added mail
All checks were successful
GiteaTest/JenkinsGoTest/pipeline/head This commit looks good

This commit is contained in:
2021-01-05 01:48:44 +01:00
parent 2812ae5519
commit 73277b0cf3

View File

@@ -8,9 +8,14 @@ pipeline {
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
emailext body: '$DEFAULT_CONTENT', recipientProviders: [buildUser()], subject: '$DEFAULT_SUBJECT', to: 'bramm.p11@gmail.com'
}
}
}