added SHA256 and sync both the sig and the zip
Gitea Bucky/url-shortener/pipeline/head There was a failure building this commit
Gitea Bucky/url-shortener/pipeline/head There was a failure building this commit
This commit is contained in:
Vendored
+5
-2
@@ -121,14 +121,16 @@ pipeline {
|
|||||||
archiveArtifacts artifacts: '*.tgz'
|
archiveArtifacts artifacts: '*.tgz'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('upload to artifact repo') {
|
stage('Generate SHA256 Hash and Upload to Artifact Repository') {
|
||||||
steps {
|
steps {
|
||||||
sh ''' #!/usr/local/bin/bash
|
sh ''' #!/usr/local/bin/bash
|
||||||
UUID=$(uuidgen -r)
|
UUID=$(uuidgen -r)
|
||||||
VERSION=$(cat VERSION | cut -d"'" -f2)
|
VERSION=$(cat VERSION | cut -d"'" -f2)
|
||||||
BRANCH=${BRANCH_NAME}
|
BRANCH=${BRANCH_NAME}
|
||||||
ZIP_FILE="url-shortener_${BRANCH_NAME}_$(cat VERSION | cut -d"'" -f2).tgz"
|
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 {
|
steps {
|
||||||
sh 'rm -rf /tmp/url-shortener'
|
sh 'rm -rf /tmp/url-shortener'
|
||||||
|
sh 'rm SHA256.sig'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user