Create a publishable artifact list; Create a checksum list

This commit is contained in:
Dan Hawkins 2018-11-17 23:09:52 +00:00
commit 3122037d60

View file

@ -4,9 +4,14 @@ 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) {
def sha256sumfound = true
if (!fileExists("${SHA256SUM}")) {
sha256sumfound = false
def sha256sumfound = false
if (env.SHA256SUM) {
if (fileExists("${SHA256SUM}")) {
sha256sumfound = true
}
}
if (!sha256sumfound)
{
if (isUnix()) {
def sha256sumpath = sh(returnStdout: true, script: 'which sha256sum').trim()
if (sha256sumpath) {
@ -15,9 +20,9 @@ def generatelist(checksummable) {
sha256sumfound = true
}
}
if (!sha256sumfound) {
error "Please define the path to a sha256sum utility in the SHA256SUM environment variable"
}
}
if (!sha256sumfound) {
error "Please define the path to a sha256sum utility in the SHA256SUM environment variable"
}
def CHECKSUMFOLDER = "${WORKSPACE}/checksums"
sh """