Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • myJenkinsFile
  • build_JenkinsFile
  • deploy_JenkinsFile
  • buildSteps
  • ...

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

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

Suggestions ??

like image 343
firasKoubaa Avatar asked Oct 19 '25 17:10

firasKoubaa


1 Answers

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)

like image 154
robertobatts Avatar answered Oct 21 '25 14:10

robertobatts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!