Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Commit

Permalink
Begin stubbing out the shared library.
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Tyler Croy committed Jan 4, 2018
1 parent 99b6ccf commit cb8cf63
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -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.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

Empty file added src/.gitignore
Empty file.
Empty file added vars/.gitignore
Empty file.
15 changes: 15 additions & 0 deletions vars/archive.groovy
Original file line number Diff line number Diff line change
@@ -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)
}
12 changes: 12 additions & 0 deletions vars/archiveArtifacts.groovy
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit cb8cf63

Please sign in to comment.