diff --git a/jenkinsfile b/jenkinsfile index 96d1b78..f7eb55c 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -8,10 +8,12 @@ pipeline { steps { // Build SH script sh '''export PATH=$PATH:/usr/local/go/bin - go build -o "HelloWorld-amd64$BUILD_DISPLAY_NAME"''' + go build -o "HelloWorld-amd64-$BUILD_DISPLAY_NAME" + cp HelloWorld-amd64-$BUILD_DISPLAY_NAME HelloWorld-amd64-Latest + ''' // Archive Build file // Local - archiveArtifacts artifacts: 'HelloWorld-amd64*', onlyIfSuccessful: true + archiveArtifacts artifacts: 'HelloWorld-amd64$BUILD_DISPLAY_NAME', 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