added SHA256 and sync both the sig and the zip
Gitea Bucky/url-shortener/pipeline/head There was a failure building this commit Details

master
Adam Townsend 2023-12-18 15:51:41 -08:00
parent 25d94bbfc2
commit e362cef9ba
1 changed files with 5 additions and 2 deletions

7
Jenkinsfile vendored
View File

@ -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'
}
}
}