added SHA256 and sync both the sig and the zip
Gitea Bucky/url-shortener/pipeline/head There was a failure building this commit
Details
Gitea Bucky/url-shortener/pipeline/head There was a failure building this commit
Details
parent
25d94bbfc2
commit
e362cef9ba
|
|
@ -121,14 +121,16 @@ pipeline {
|
|||
archiveArtifacts artifacts: '*.tgz'
|
||||
}
|
||||
}
|
||||
stage('upload to artifact repo') {
|
||||
stage('Generate SHA256 Hash and Upload to Artifact Repository') {
|
||||
steps {
|
||||
sh ''' #!/usr/local/bin/bash
|
||||
UUID=$(uuidgen -r)
|
||||
VERSION=$(cat VERSION | cut -d"'" -f2)
|
||||
BRANCH=${BRANCH_NAME}
|
||||
ZIP_FILE="url-shortener_${BRANCH_NAME}_$(cat VERSION | cut -d"'" -f2).tgz"
|
||||
rsync $ZIP_FILE artifactor@10.0.09:projects/url-shortener/$BRANCH/$VERSION/$UUID/
|
||||
sha256 ZIP_FILE >> SHA256.sig
|
||||
rsync SHA256.sig artifactor@10.0.0.9:projects/url-shortener/$BRANCH/$VERSION/$UUID/
|
||||
rsync $ZIP_FILE artifactor@10.0.0.9:projects/url-shortener/$BRANCH/$VERSION/$UUID/
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
@ -140,6 +142,7 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
sh 'rm -rf /tmp/url-shortener'
|
||||
sh 'rm SHA256.sig'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue