Package io.fabric8.jenkins.openshiftsync
Class BuildConfigToJobMapper
- java.lang.Object
-
- io.fabric8.jenkins.openshiftsync.BuildConfigToJobMapper
-
public class BuildConfigToJobMapper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_JENKINS_FILEPATH
static String
JENKINS_PIPELINE_BUILD_STRATEGY
-
Constructor Summary
Constructors Constructor Description BuildConfigToJobMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.jenkinsci.plugins.workflow.flow.FlowDefinition
mapBuildConfigToFlow(io.fabric8.openshift.api.model.BuildConfig bc)
static boolean
updateBuildConfigFromJob(org.jenkinsci.plugins.workflow.job.WorkflowJob job, io.fabric8.openshift.api.model.BuildConfig buildConfig)
Updates theBuildConfig
if the JenkinsWorkflowJob
changes
-
-
-
Field Detail
-
JENKINS_PIPELINE_BUILD_STRATEGY
public static final String JENKINS_PIPELINE_BUILD_STRATEGY
- See Also:
- Constant Field Values
-
DEFAULT_JENKINS_FILEPATH
public static final String DEFAULT_JENKINS_FILEPATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
mapBuildConfigToFlow
public static org.jenkinsci.plugins.workflow.flow.FlowDefinition mapBuildConfigToFlow(io.fabric8.openshift.api.model.BuildConfig bc) throws IOException
- Parameters:
bc
- A BuildConfig object.- Returns:
- the FlowDefinition representing a Jenkins Build built from a pipeline.
- Throws:
IOException
-
updateBuildConfigFromJob
public static boolean updateBuildConfigFromJob(org.jenkinsci.plugins.workflow.job.WorkflowJob job, io.fabric8.openshift.api.model.BuildConfig buildConfig)
Updates theBuildConfig
if the JenkinsWorkflowJob
changes- Parameters:
job
- the job thats been updated via JenkinsbuildConfig
- the OpenShift BuildConfig to update- Returns:
- true if the BuildConfig was changed This will be decided if the Definition in the Job is of type CpsFlowDefinition or CpsScmFlowDefinition
-
-