Create PAX file on the folder provided
The local work place folder should have these sub-folder(s) or files:
If the process is successfully, a PAX file (named followed "filename" argument of pack(Map) will be placed in the localWorkspace.
Type | Name and description |
---|---|
static java.lang.String |
DEFAULT_LOCAL_WORKSPACE Constant of default local workspace folder. |
static java.lang.String |
DEFAULT_REMOTE_WORKSPACE Constant of default remote workspace folder. |
static java.lang.String |
HOOK_CATCHALL_PACKAGING Constant of catchall-packaging hook |
static java.lang.String |
HOOK_POST_PACKAGING Constant of post-packaging hook |
static java.lang.String |
HOOK_PREPARE_WORKSPACE Constant of prepare-packaging hook name |
static java.lang.String |
HOOK_PRE_PACKAGING Constant of pre-packaging hook |
static java.lang.String |
PATH_ASCII Constant of local ascii folder name |
static java.lang.String |
PATH_CONTENT Constant of local content folder name |
java.lang.String |
localWorkspace Local workspace folder name |
java.lang.String |
remoteWorkspace Remote workspace folder name |
java.lang.String |
sshCredential SSH server credential ID |
java.lang.String |
sshHost SSH server to run pax |
java.lang.String |
sshPort SSH server port |
java.lang.Object |
steps Reference to the groovy pipeline variable. |
Constructor and description |
---|
Pax
(java.lang.Object steps) Constructs the class. |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
init(java.util.Map args = [:]) Initialize pax packaging properties |
|
java.lang.String |
pack(java.util.Map args = [:]) Create PAX Package |
|
java.lang.String |
pack(java.lang.String job, java.lang.String filename, java.util.Map environments = [:], java.lang.String paxOptions = '') Create PAX Package |
|
java.lang.String |
unpack(java.util.Map args = [:]) Extract PAX Package to remoteWorkspace |
|
java.lang.String |
unpack(java.lang.String filename, java.lang.String remoteWorkspace, java.lang.String paxOptions = '') Extract PAX Package to remoteWorkspace |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constant of default local workspace folder.
".pax"
Constant of default remote workspace folder.
"/tmp"
Constant of catchall-packaging hook
"catchall-packaging.sh"
Constant of post-packaging hook
"post-packaging.sh"
Constant of prepare-packaging hook name
"prepare-workspace.sh"
Constant of pre-packaging hook
"pre-packaging.sh"
Constant of local ascii folder name
"ascii"
Constant of local content folder name
"content"
Local workspace folder name
Remote workspace folder name
SSH server credential ID
The content of token could be base64 encoded "username:password".
SSH server to run pax
SSH server port
22
Reference to the groovy pipeline variable.
Constructs the class.
When invoking from a Jenkins pipeline script, the Pipeline must be passed the current environment of the Jenkinsfile to have access to the steps.
def pax = new Pax(this)
steps
- The workflow steps object provided by the Jenkins pipelineInitialize pax packaging properties
localWorkspace
- workspace folder on local. Default value is DEFAULT_LOCAL_WORKSPACE.remoteWorkspace
- workspace folder on remote (ssh server). Default value is DEFAULT_REMOTE_WORKSPACE.sshHost
- hostname/ip of packaging serversshPort
- ssh port of packaging serversshCredential
- SSH credential of packaging serverCreate PAX Package
job
- job identifierfilename
- package file name will be createdextraFiles
- extra artifacts will be generated and should be transferred backenvironments
- environment variablespaxOptions
- pax write command optionscompress
- if we want to compress the resultcompressOptions
- compress command optionskeepTempFolder
- if we want to keep the temporary packaging folder on the remote machine
for debugging purpose. Default is false.Create PAX Package
Extract PAX Package to remoteWorkspace
filename
- package file name will be extractedpaxOptions
- pax extract command optionsExtract PAX Package to remoteWorkspace
Groovy Documentation