Create a publishable artifact list; Create a checksum list

This commit is contained in:
Dan Hawkins 2018-11-17 21:29:07 +00:00
commit 5784414715

View file

@ -4,8 +4,20 @@ env.CHECKSUMARTIFACTS = "checksums/**"
// SHA256SUM environment variable must be set to sha256sum utility
// Generate a checksum file of from a list of files/directories relative to workspace
def generatelist(checksummable) {
if !fileExists("${SHA256SUM}") {
error "Please define the path to a sha256sum utility in the SHA256SUM environment variable"
def sha256sumfound = true
if (!fileExists("${SHA256SUM}")) {
def sha256sumfound = false
if (isUnix()) {
def sha256sumpath = sh(returnStdout: true, script: 'which sha256sum').trim()
if (sha256sumpath) {
echo "Found sha256sum executable here:
env.SHA256SUM = sha256sumpath
sha256sumfound = true
}
}
if (!sha256sumfound) {
error "Please define the path to a sha256sum utility in the SHA256SUM environment variable"
}
}
def CHECKSUMFOLDER = "${WORKSPACE}/checksums"
sh """