Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52683

Allow flexible source definition in WorkflowBranchProjectFactories



    • Similar Issues:


      I'd like to write an extension which allows a different script path to be set for Tag type heads.

      My use case is that my Branch type builds build, test and store artifacts ready for release/deploy. Only tag builds perform whatever is needed to release that artifact. Releasing can mean different things for different projects. For smaller projects, it's ok to have the entire pipeline run again with an additional release stage covered by a when directive checking for a tag. With a large project this is an unfortunate inefficiency. I would like to define a separate Jenkinsfile which just handles releasing the artifact previously built in the branch build.


      I figure this can be possible by defining a new BranchProjectFactory, and using the createDefinition method to pick one Jenkinsfile for branch/pr and one for tags. The method would need to expose information about the head being built though. Perhaps passing through the Branch object would be helpful?



          stevenfoster Steven Foster created issue -
          stephenconnolly Stephen Connolly made changes -
          Field Original Value New Value
          Assignee Stephen Connolly [ stephenconnolly ]


            • Assignee:
              stevenfoster Steven Foster
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: