Reputation: 930
I have couple of build pipelines configured in Jenkins. Is there a way to export them into Jenkinsfile
s so that it can be checked in source code (I want to use it pipeline as a code).
Thanks!
Upvotes: 2
Views: 4070
Reputation: 349
You can use the pipeline as code steps to add a Jenkinsfile to your codebase. Please refer the below link.
https://jenkins.io/solutions/pipeline/
You can also look out for Declarative Pipeline as well.
https://jenkins.io/blog/2017/02/03/declarative-pipeline-ga/
If you have already have the pipeline steps, please create a Jenkinsfile(by copying the contents of the pipeline code) at the root folder of your repo and create a Pipeline/MultiBranch Pipeline/Github Organization job based on your convenience.
Please let me know if you would require further information on the same.
Upvotes: 1