Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way how to convert Jenkins project into Pipeline? [closed]

I do have existing project which has a few steps and I would like to have exactly same thing with multibranch support. Multi branch project is looking good but I need to use Pipeline and create Jenkinsfile, but when it comes to Pipelines I do struggle to find good documentation and examples.

So an idea is that it would be really handy, if I can convert existing project into Pipeline because that would really help.

Is there a way how this can be done or do I have to write Jenkinsfile from scratch?

like image 519
Zdenek Machek Avatar asked Dec 20 '16 08:12

Zdenek Machek


2 Answers

I don't know a tool that converts existing project to pipeline project, so I guess you'd have to start from scratch.

The documentation is not great but there are plenty of resource to follow:

  • Jenkins.io book pipeline section
  • Pipeline steps and workflow-basic-steps
  • fabric8 - great examples on how to use the Shared Groovy Library Plugin
  • http://your-jenkins/pipeline-syntax/ - Pipeline Snippet Generator and /pipeline-syntax/globals for global variable reference
like image 185
Amityo Avatar answered Oct 24 '22 04:10

Amityo


I haven't tried it, but I've seen that others have. Use this to translate your current project's config.xml: https://github.com/visualphoenix/jenkins-xml-to-jobdsl

like image 26
Generic Ratzlaugh Avatar answered Oct 24 '22 05:10

Generic Ratzlaugh