Is it possible to run a jenkinsfile from a freestyle project

Viewed 6118

I have a freestyle project on Jenkins. I'm trying to add in that the build runs a Jenkins pipeline (Jenkinsfile) as a step.

We currently use Jenkins steps to run our builds but are looking to move towards fully automating everything with pipelines, so are trying to use a mix of both at the moment.

Is this possible?

If so, how can it be done? I've looked through the available Jenkins plugins to see if any of them allow this to be done but I can't find anything.

1 Answers

With freestyle, there isn't an option to run another Jenkins build as a build step. However, freestyle has a Trigger option to 'run this build after another build completes' and a Post Build option to 'run another build after this build completes'. With those options, you could split one freestyle build with desired steps: (Xfree, Ypipe, Zfree) into two freestyle builds: (Xfree, post build Ypipe) and (trigger Ypipe complete, Zfree), to use a mix of both types.

Related