Create a publishable artifact list; Create a checksum list
This commit is contained in:
parent
e4538f4bd4
commit
3122037d60
1 changed files with 11 additions and 6 deletions
|
|
@ -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 """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue