-
New Feature
-
Resolution: Duplicate
-
Minor
-
None
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with existing examples.
This would be a logical extension for shared libraries and the directory structure perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option.
A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in this github project.
1) Create a template pipeline XML with the Git repo and the pipeline definition file paths embedded.
2) Import as a pipeline job:
java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < pipeline.xml
- duplicates
-
JENKINS-42224 Need ability to create reusable chunks of Declarative Pipeline
-
- Open
-
[JENKINS-42327] Add support for defining declarative pipeline templates in shared libraries
Description |
Original:
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with [ existing examples ](https://github.com/fabric8io/fabric8-jenkinsfile-library). This would be a logical extension for shared libraries and the [directory structure](https://jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure) perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option. A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in [this github project](https://github.com/kitconcept/jenkins-pipeline-examples). 1) Create [a template skeleton XML](https://github.com/kitconcept/jenkins-pipeline-examples/blob/master/job-templates/pipeline.xml) with the Git repo and the pipeline definition file paths embedded. 2) Import as a pipeline job: {{java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < /home/vagrant/jenkins-pipeline-examples/pipeline.xml}} |
New:
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with [ existing examples | https://github.com/fabric8io/fabric8-jenkinsfile-library]. This would be a logical extension for shared libraries and the [directory structure|https://jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure] perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option. A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in [this github project|https://github.com/kitconcept/jenkins-pipeline-examples]. 1) Create [a template pipeline XML|https://github.com/kitconcept/jenkins-pipeline-examples/blob/master/job-templates/pipeline.xml] with the Git repo and the pipeline definition file paths embedded. 2) Import as a pipeline job: {{java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < /home/vagrant/jenkins-pipeline-examples/pipeline.xml}} |
Description |
Original:
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with [ existing examples | https://github.com/fabric8io/fabric8-jenkinsfile-library]. This would be a logical extension for shared libraries and the [directory structure|https://jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure] perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option. A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in [this github project|https://github.com/kitconcept/jenkins-pipeline-examples]. 1) Create [a template pipeline XML|https://github.com/kitconcept/jenkins-pipeline-examples/blob/master/job-templates/pipeline.xml] with the Git repo and the pipeline definition file paths embedded. 2) Import as a pipeline job: {{java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < /home/vagrant/jenkins-pipeline-examples/pipeline.xml}} |
New:
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with [existing examples|https://github.com/fabric8io/fabric8-jenkinsfile-library]. This would be a logical extension for shared libraries and the [directory structure|https://jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure] perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option. A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in [this github project|https://github.com/kitconcept/jenkins-pipeline-examples]. 1) Create [a template pipeline XML|https://github.com/kitconcept/jenkins-pipeline-examples/blob/master/job-templates/pipeline.xml] with the Git repo and the pipeline definition file paths embedded. 2) Import as a pipeline job: {{java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < /home/vagrant/jenkins-pipeline-examples/pipeline.xml}} |
Description |
Original:
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with [existing examples|https://github.com/fabric8io/fabric8-jenkinsfile-library]. This would be a logical extension for shared libraries and the [directory structure|https://jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure] perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option. A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in [this github project|https://github.com/kitconcept/jenkins-pipeline-examples]. 1) Create [a template pipeline XML|https://github.com/kitconcept/jenkins-pipeline-examples/blob/master/job-templates/pipeline.xml] with the Git repo and the pipeline definition file paths embedded. 2) Import as a pipeline job: {{java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < /home/vagrant/jenkins-pipeline-examples/pipeline.xml}} |
New:
With the 1.0 release of model definition, we are defining the entire pipeline job as code. However, there is no standard as far as I am aware for sharing multiple Jenkinsfile(s) in an organization in git repository. There is definitely a use case for this, along with [existing examples|https://github.com/fabric8io/fabric8-jenkinsfile-library]. This would be a logical extension for shared libraries and the [directory structure|https://jenkins.io/doc/book/pipeline/shared-libraries/#directory-structure] perhaps by adding a 'pipelines/' folder. These could appear in a drop down when creating a pipeline job (not multibranch). One way would be to have a 'Pipeline Script from Library' option similar to the 'Pipeline Script from SCM' option. A future extension could be to automatically generate Jenkins jobs from pipelines in a library. Right now, this can be done using the CLI as used in [this github project|https://github.com/kitconcept/jenkins-pipeline-examples]. 1) Create [a template pipeline XML|https://github.com/kitconcept/jenkins-pipeline-examples/blob/master/job-templates/pipeline.xml] with the Git repo and the pipeline definition file paths embedded. 2) Import as a pipeline job: {{java -jar jenkins-cli.jar -s http://localhost:8080 create-job pipeline < pipeline.xml}} |
Link | New: This issue duplicates JENKINS-42224 [ JENKINS-42224 ] |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Bulk closing resolved issues.