Created
May 4, 2019 09:18
-
-
Save ferico55/13c0ba4141797e31a096d1ade8fc9e47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def workspaceSha | |
node('native') { | |
stage ('setup workspace') { | |
def sha = sh( | |
script: "echo -n '${env.JOB_NAME}-${env.BUILD_NUMBER}' | shasum -a 256", | |
returnStdout: true | |
) | |
workspaceSha = sha.take(10) | |
} | |
} | |
pipeline { | |
agent { | |
node { | |
label 'native' | |
customWorkspace "/j/d1/${workspaceSha}" | |
} | |
} | |
stages { | |
# everything else here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment