Class WriteJSONStep
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
-
- org.jenkinsci.plugins.workflow.steps.Step
-
- org.jenkinsci.plugins.pipeline.utility.steps.json.WriteJSONStep
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<org.jenkinsci.plugins.workflow.steps.Step>
public class WriteJSONStep extends org.jenkinsci.plugins.workflow.steps.Step
Writes aJSON
object to file in the current working directory.- Author:
- Nikolas Falco
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WriteJSONStep.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description WriteJSONStep(Object json)
WriteJSONStep(String file, Object json)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFile()
Returns the name of the file to write.Object
getJson()
Return the JSON object to save.int
getPretty()
Return the number of spaces used to prettify the JSON dump.boolean
isReturnText()
void
setFile(String file)
void
setReturnText(boolean returnText)
org.jenkinsci.plugins.workflow.steps.StepExecution
start(org.jenkinsci.plugins.workflow.steps.StepContext context)
-
-
-
Constructor Detail
-
WriteJSONStep
@DataBoundConstructor public WriteJSONStep(Object json)
-
WriteJSONStep
@Deprecated public WriteJSONStep(String file, Object json)
Deprecated.
-
-
Method Detail
-
getFile
public String getFile()
Returns the name of the file to write.- Returns:
- the file name
-
setFile
@DataBoundSetter public void setFile(String file)
-
getJson
public Object getJson()
Return the JSON object to save.If it is not a
JSON
object,JSONObject.fromObject(Object)
will be used in a first step.- Returns:
- an object
-
getPretty
public int getPretty()
Return the number of spaces used to prettify the JSON dump.- Returns:
- a int
-
isReturnText
public boolean isReturnText()
-
setReturnText
@DataBoundSetter public void setReturnText(boolean returnText)
-
-