Class PublishStepExecution
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.steps.StepExecution
-
- org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution<PublishResult>
-
- io.apimap.plugin.jenkins.step.publish.PublishStepExecution
-
- All Implemented Interfaces:
Serializable
public class PublishStepExecution extends org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution<PublishResult>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CHANGELOG_FILE_MISSING_ERROR
static String
FILEPATH_IS_A_NULL_OBJECT
static String
MARKDOWN_FILE_FORMAT_REQUIRED
static String
METADATA_FILE_MISSING_ERROR
static String
MISSING_OR_INVALID_API_TOKEN_ERROR_MESSAGE
static String
README_FILE_MISSING_ERROR
static String
STEP_COMPLETED_SUCCESSFULLY
static String
TAXONOMY_FILE_MISSING_ERROR
static String
UNABLE_TO_UPLOAD_CHANGELOG_ERROR_MESSAGE
static String
UNABLE_TO_UPLOAD_METADATA_ERROR_MESSAGE
static String
UNABLE_TO_UPLOAD_README_ERROR_MESSAGE
static String
UNABLE_TO_UPLOAD_TAXONOMY_ERROR_MESSAGE
-
Constructor Summary
Constructors Constructor Description PublishStepExecution(PublishStep step, org.jenkinsci.plugins.workflow.steps.StepContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PublishResult
failure(String description, String token)
protected PublishResult
run()
protected PublishResult
success(String description, String token, org.apache.commons.lang.mutable.MutableBoolean isApiCreate)
protected String
uploadChangelog(String apiName, String apiVersion, String changelog, io.apimap.client.RestClientConfiguration configuration)
protected io.apimap.api.rest.MetadataDataRestEntity
uploadMetadata(io.apimap.file.metadata.MetadataFile metadataFile, io.apimap.client.RestClientConfiguration configuration, org.apache.commons.lang.mutable.MutableBoolean isApiCreated)
protected String
uploadReadme(String apiName, String apiVersion, String readme, io.apimap.client.RestClientConfiguration configuration)
protected io.apimap.api.rest.ClassificationRootRestEntity
uploadTaxonomy(String apiName, String apiVersion, io.apimap.file.taxonomy.TaxonomyFile taxonomyFile, io.apimap.client.RestClientConfiguration configuration)
-
Methods inherited from class org.jenkinsci.plugins.workflow.steps.SynchronousStepExecution
start, stop
-
-
-
-
Field Detail
-
FILEPATH_IS_A_NULL_OBJECT
public static final String FILEPATH_IS_A_NULL_OBJECT
- See Also:
- Constant Field Values
-
METADATA_FILE_MISSING_ERROR
public static final String METADATA_FILE_MISSING_ERROR
- See Also:
- Constant Field Values
-
TAXONOMY_FILE_MISSING_ERROR
public static final String TAXONOMY_FILE_MISSING_ERROR
- See Also:
- Constant Field Values
-
README_FILE_MISSING_ERROR
public static final String README_FILE_MISSING_ERROR
- See Also:
- Constant Field Values
-
CHANGELOG_FILE_MISSING_ERROR
public static final String CHANGELOG_FILE_MISSING_ERROR
- See Also:
- Constant Field Values
-
UNABLE_TO_UPLOAD_METADATA_ERROR_MESSAGE
public static final String UNABLE_TO_UPLOAD_METADATA_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
UNABLE_TO_UPLOAD_TAXONOMY_ERROR_MESSAGE
public static final String UNABLE_TO_UPLOAD_TAXONOMY_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
UNABLE_TO_UPLOAD_README_ERROR_MESSAGE
public static final String UNABLE_TO_UPLOAD_README_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
UNABLE_TO_UPLOAD_CHANGELOG_ERROR_MESSAGE
public static final String UNABLE_TO_UPLOAD_CHANGELOG_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
MISSING_OR_INVALID_API_TOKEN_ERROR_MESSAGE
public static final String MISSING_OR_INVALID_API_TOKEN_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
STEP_COMPLETED_SUCCESSFULLY
public static final String STEP_COMPLETED_SUCCESSFULLY
- See Also:
- Constant Field Values
-
MARKDOWN_FILE_FORMAT_REQUIRED
public static final String MARKDOWN_FILE_FORMAT_REQUIRED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PublishStepExecution
public PublishStepExecution(PublishStep step, org.jenkinsci.plugins.workflow.steps.StepContext context)
-
-
Method Detail
-
failure
protected PublishResult failure(String description, String token)
-
success
protected PublishResult success(String description, String token, org.apache.commons.lang.mutable.MutableBoolean isApiCreate)
-
run
protected PublishResult run() throws Exception
- Specified by:
run
in classorg.jenkinsci.plugins.workflow.steps.SynchronousStepExecution<PublishResult>
- Throws:
Exception
-
uploadMetadata
protected io.apimap.api.rest.MetadataDataRestEntity uploadMetadata(io.apimap.file.metadata.MetadataFile metadataFile, io.apimap.client.RestClientConfiguration configuration, org.apache.commons.lang.mutable.MutableBoolean isApiCreated) throws IOException, InterruptedException, io.apimap.client.exception.IncorrectTokenException, PublishErrorException
- Throws:
IOException
InterruptedException
io.apimap.client.exception.IncorrectTokenException
PublishErrorException
-
uploadTaxonomy
protected io.apimap.api.rest.ClassificationRootRestEntity uploadTaxonomy(String apiName, String apiVersion, io.apimap.file.taxonomy.TaxonomyFile taxonomyFile, io.apimap.client.RestClientConfiguration configuration) throws IOException, io.apimap.client.exception.IncorrectTokenException, PublishErrorException
- Throws:
IOException
io.apimap.client.exception.IncorrectTokenException
PublishErrorException
-
uploadReadme
protected String uploadReadme(String apiName, String apiVersion, String readme, io.apimap.client.RestClientConfiguration configuration) throws IOException, io.apimap.client.exception.IncorrectTokenException, PublishErrorException
- Throws:
IOException
io.apimap.client.exception.IncorrectTokenException
PublishErrorException
-
uploadChangelog
protected String uploadChangelog(String apiName, String apiVersion, String changelog, io.apimap.client.RestClientConfiguration configuration) throws IOException, io.apimap.client.exception.IncorrectTokenException, PublishErrorException
- Throws:
IOException
io.apimap.client.exception.IncorrectTokenException
PublishErrorException
-
-