jenkinsjenkins-pipelinejenkins-pluginsjenkins-groovy

Jenkins : Change the name of JenkinsFile


I'm using Pipeline Plugin under Jenkins

My job is basically using a file called "jenkinsFile" to get the divers steps to run.

-> My purpose is how to let the job use a different file name :

examples:

Since it seems that "JenkinsFile" is a conventional format ,

is there any ways to change it if it's not verry clean ??

Suggestions ??


Solution

  • On the project section of the configuration page you just have to click Add > Pipeline Jenkins and then you can choose the custom name that jenkins will look for the pipeline.

    enter image description here

    If you want also a better level of customization you can also use Remote File Plugin, which allows you to put your pipeline in a repository and make it work with multiple repositories/branch (and of course you can still customize the name of the file)