I see multiple usages of unarchive
in the tutorial of the Jenkins workflow plugin.
But I'm not able to find any documentation about its syntax and options.
cleanWs : Delete workspace when build is done.
You could simply archive the complete workspace at the end of a build. It would then get deleted when the job is deleted. To do this: Add post-build action -> "Archive the artifacts"
Pipelines are Jenkins jobs enabled by the Pipeline (formerly called “workflow”) plugin and built with simple text scripts that use a Pipeline DSL (domain-specific language) based on the Groovy programming language.
currentBuild is a global variable that may be used to refer to the currently running build.
There is a usage blurb in the snippet generator:
May take a
mapping
parameter which is a map from artifact names (files, directories ending in/
, or any other Ant patternsets), to workspace destination names.For example to copy one file:
unarchive mapping: ['target/my.war': 'here.war']
To copy a whole directory:
unarchive mapping: ['dir/' : '.']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With