diff --git a/README.adoc b/README.adoc index e69de29..8a0b946 100644 --- a/README.adoc +++ b/README.adoc @@ -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. diff --git a/vars/defaultsFor.groovy b/vars/defaultsFor.groovy new file mode 100644 index 0000000..3bb99bd --- /dev/null +++ b/vars/defaultsFor.groovy @@ -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 + } +} diff --git a/vars/script.groovy b/vars/script.groovy index 764d370..d8d0cb2 100644 --- a/vars/script.groovy +++ b/vars/script.groovy @@ -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"