Converting Classic to Pipeline questions

18 views
Skip to first unread message

Louis Elston

unread,
Sep 3, 2019, 2:14:05 PM9/3/19
to Jenkins Users

Considering that your current Jenkins system is using classic jobs (no pipelines) ...how to tell if these jobs can be converted to a pipeline job?

 

This page: https://plugins.jenkins.io/,  lists all the Jenkins plugins.  If I enter ‘pipeline’ in the search box, it brings up 104 plugins (not sorted by name).

 

If the plugin you are using in your classic job is not one of these 104, does that mean that this classic job cannot be converted to a pipeline job (scripted or declarative), or, does it mean that what you are doing must somehow be done in an external sh or bat script?

 

When creating a pipeline job, the Snippet Generator has a lot more drop-down selections than the Declarative Directive Generator…why?  Is it that you are supposed to use the Snippet Generator code inside ‘script’ blocks under a step, in declarative?

 

If you are running a Jenkins pipeline job, being that you are under the ‘Jenkins’ umbrella, using Jenkins API calls can you call any non-pipeline plugins?

 

Do the pipeline plugins have their own API documentation that I can use to determine what commands and parameters can be used with or passed to these pipeline plugins?  For example, for SCM…

 

Pipeline Script, connect to GitHub…

  Git ‘https://github.com/jglick/simple-maven-project-with-tests.git

Declarative Pipeline, connect to GitHub…

  Git (url: ‘https://github.com/jglick/simple-maven-project-with-tests.git’, branch: ‘master’)

 

Similar, but different, how to know which one to use if just editing a Jenkinsfile, and not using the Jenkins IDE to look at the code generators?  There are differences also when using Scripted or Declarative, when going to GIT (not GitHub).

Matt Hicks

unread,
Sep 4, 2019, 9:05:06 PM9/4/19
to Jenkins Users

how to tell if these jobs can be converted to a pipeline job?


The pipeine steps reference lists all plugins that include pipeline support.  If the freestyle jobs to convert use plugins from that list it should be relatively easy to convert.  If plugins not in the list are used (e.g. Promoted Builds plugin), you will have to keep those steps in a freestyle job, search for a similar plugin that has pipeline support, or build it yourself--perhaps in a shell script.
 
 
Reply all
Reply to author
Forward
0 new messages