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

Allow flexible source definition in WorkflowBranchProjectFactories

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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?

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: