Created
May 14, 2018 13:46
-
-
Save boxrick/3181f5796848c3df6938c6fff800993c to your computer and use it in GitHub Desktop.
example
This file contains 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
pipelineJob('test2') { | |
logRotator { | |
numToKeep(10) | |
} | |
definition { | |
cps { | |
script(""" | |
pipeline | |
{ | |
parameters { | |
booleanParam(defaultValue: true, description: '', name: 'userFlag') | |
} | |
options | |
{ | |
buildDiscarder(logRotator(numToKeepStr: '100')) | |
} | |
agent any | |
stages { | |
stage("foo") { | |
steps { | |
echo "flag: ${params.userFlag}" | |
} | |
} | |
} | |
} | |
""".stripIndent()) | |
sandbox() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment