public class UnZipStep
extends org.jenkinsci.plugins.workflow.steps.Step
| Modifier and Type | Class and Description |
|---|---|
static class |
UnZipStep.DescriptorImpl |
| Modifier and Type | Method and Description |
|---|---|
String |
getCharset()
Get the charset to use when unzipping the zip file.
|
String |
getDir()
The relative path of the base directory to create the zip from.
|
String |
getGlob()
Ant style pattern
of files to extract from the zip.
|
String |
getZipFile()
The name/path of the zip file to extract.
|
boolean |
isQuiet()
Suppress the verbose output that logs every single file that is dealt with.
|
boolean |
isRead()
Read the content of the files into a String instead of writing them to the workspace.
|
boolean |
isTest()
Test the integrity of the archive instead of extracting it.
|
void |
setCharset(String charset)
Set the charset to use when unzipping the zip file.
|
void |
setDir(String dir)
The relative path of the base directory to create the zip from.
|
void |
setGlob(String glob)
Ant style pattern
of files to extract from the zip.
|
void |
setQuiet(boolean quiet)
Suppress the verbose output that logs every single file that is dealt with.
|
void |
setRead(boolean read)
Read the content of the files into a String instead of writing them to the workspace.
|
void |
setTest(boolean test)
Test the integrity of the archive instead of extracting it.
|
org.jenkinsci.plugins.workflow.steps.StepExecution |
start(org.jenkinsci.plugins.workflow.steps.StepContext context) |
@DataBoundConstructor public UnZipStep(String zipFile) throws hudson.model.Descriptor.FormException
hudson.model.Descriptor.FormExceptionpublic String getZipFile()
public String getDir()
@DataBoundSetter public void setDir(String dir)
dir - the dirpublic String getGlob()
@DataBoundSetter public void setGlob(String glob)
glob - the include patternpublic boolean isTest()
getZipFile()) will be ignored.
The step will return true or false depending on the result
instead of throwing an exception.@DataBoundSetter public void setTest(boolean test)
getZipFile()) will be ignored.
The step will return true or false depending on the result
instead of throwing an exception.test - if the archive should just be tested or notpublic boolean isRead()
String version = unzip zipFile: 'example.zip', glob: 'version.txt', read: true@DataBoundSetter public void setRead(boolean read)
String version = unzip zipFile: 'example.zip', glob: 'version.txt', read: trueread - if the content should be read to a string instead of written to the workspacepublic String getCharset()
String version = unzip zipFile: 'example.zip', glob: 'version.txt', read: true, charset: UTF-8@DataBoundSetter public void setCharset(String charset)
String version = unzip zipFile: 'example.zip', glob: 'version.txt', read: true , charset: UTF-8charset - the charset to use when unzipping, defaults to UTF-8public boolean isQuiet()
unzip zipFile: 'example.zip', glob: 'version.txt', quiet: true@DataBoundSetter public void setQuiet(boolean quiet)
unzip zipFile: 'example.zip', glob: 'version.txt', quiet: truequiet - if verbose logging should be suppressedCopyright © 2016–2020. All rights reserved.