Begin stubbing out the shared library.

This commit is contained in:
R. Tyler Croy 2018-01-03 17:39:38 -08:00
parent 99b6ccf329
commit cb8cf635df
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
6 changed files with 34 additions and 1 deletions

7
README.adoc Normal file
View File

@ -0,0 +1,7 @@
= External Artifacts
This link:https://jenkins.io/doc/book/pipeline/shared-libraries[Pipeline Shared Library]
performs an
link:http://unethicalblogger.com/2017/08/03/overriding-builtin-steps-pipeline.html[override]
of the built-in `archive` and `archiveArtifacts` steps to provide external
artifact storage.

View File

@ -1 +0,0 @@
# external-artifacts

0
src/.gitignore vendored Normal file
View File

0
vars/.gitignore vendored Normal file
View File

15
vars/archive.groovy Normal file
View File

@ -0,0 +1,15 @@
/*
* archive - override the built-in `archive` step.
*
* This is just a support shim to pass off to the "real" step worth overriding:
* archiveArtifacts
*/
def call(Map args) {
assert args.includes
return archiveArtifacts(artifacts: args.includes, excludes: args.excludes)
}
def call(String includes) {
return call(includes: includes)
}

View File

@ -0,0 +1,12 @@
/*
* archiveArtifacts- override the built-in `archiveArtifacts` step.
*/
def call(Map args) {
assert args.artifacts
echo args
}
def call(String artifacts) {
return call(artifacts: includes)
}