Add a sketch of a defaultsFor step to "just do the right thing"
This commit is contained in:
parent
d968d85eba
commit
203d402e55
|
@ -0,0 +1,5 @@
|
|||
= Code Valet Pipeline Library
|
||||
|
||||
This is a
|
||||
link:https://jenkins.io/doc/book/pipeline/shared-libraries[Shared Library]
|
||||
which provides a number of steps for a `Jenkinsfile` executing in Code Valet.
|
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* This step applies the default Pipeline for the given langauge definition.
|
||||
*/
|
||||
|
||||
def call(String platform) {
|
||||
switch (platform) {
|
||||
case 'java':
|
||||
echo 'Hello World'
|
||||
break
|
||||
|
||||
default:
|
||||
fail "I do not know what the defaults for `${platform}` should be :("
|
||||
break
|
||||
}
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
/**
|
||||
* This step just exists to override the script {} block for /most/ users in
|
||||
* Declarative Pipeline
|
||||
*/
|
||||
def call(Closure body) {
|
||||
echo "I know you want me to run some Scripted Pipeline"
|
||||
echo "But I'm not going to"
|
||||
|
|
Loading…
Reference in New Issue