Class BuildConfigToJobMapper


  • public class BuildConfigToJobMapper
    extends Object
    • Constructor Detail

      • BuildConfigToJobMapper

        public BuildConfigToJobMapper()
    • 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 the BuildConfig if the Jenkins WorkflowJob changes
        Parameters:
        job - the job thats been updated via Jenkins
        buildConfig - 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