https://github.com/devonfw/production-line-shared-lib
Jenkins "Shared libs" for Production Line templating
https://github.com/devonfw/production-line-shared-lib
Last synced: 8 months ago
JSON representation
Jenkins "Shared libs" for Production Line templating
- Host: GitHub
- URL: https://github.com/devonfw/production-line-shared-lib
- Owner: devonfw
- License: apache-2.0
- Created: 2018-10-18T10:30:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T03:34:41.000Z (over 3 years ago)
- Last Synced: 2025-04-14T13:00:21.625Z (about 1 year ago)
- Language: Groovy
- Size: 506 KB
- Stars: 5
- Watchers: 24
- Forks: 10
- Open Issues: 14
-
Metadata Files:
- Readme: README.asciidoc
- License: LICENSE
Awesome Lists containing this project
README
= SharedLib for Production Line
:imagesdir: doc/assets/images
:toc: macro
This project is a Jenkins Shared Library ( see https://jenkins.io/doc/book/pipeline/shared-libraries/ ) which provides several methods to do a pre-configuration of the 'Production Line'.
toc::[]
== Introduction
The global lib structure is package based and the hierarchy is as follows:
[source]
----
com
|
\- capgemini
|
\- productionline
|
|- configuration (containing all packages for configuring the components of the ProductionLine)
|
|- build (common functions used during build process)
|
\- deployment (common functions used during the deployment process)
----
For further information (like usage examples) please have a look in the `doc/configuration` folder of this repository. To find detailed information about the available methods please take a look at the *groovydoc* documentation in each class ( `src/com/capgemini/productionline/configuration` ).
== How to use it
=== Add the 'SharedLib for Production Line' to your Jenkins Instance
To make all of the 'SharedLib for Production Line' methods available for Jobs, the project needs to be configured as a 'Global Pipeline Library' in a Jenkins Instance. The following steps describe this activity in detail:
. Go to 'Manage Jenkins' image:ManageJenkinsScreenshot.png[Manage Jenkins Screenshot,float="left"]
. Select 'Configure System' image:ConfigureSystemJenkinsScreenshot.png[Configure System Screenshot,float="right"]
. Search for 'Global Pipeline Libraries'
. Add the library but as "Default version" use "release/1.1": " image:AddSharedLibJenkinsScreenshot.png[Add a Shared Lib Screenshot,float="right"]
=== Install plugins used by library
* Allure Jenkins Plugin
* NodeJS Plugin
* Job DSL
* HTTP Request Plugin
=== Build a new Job based on the template
To use the 'SharedLib for Production Line' in a Jenkins-Job just create a new Pipeline and start using it as shown below.
```Groovy
@Library('ProductionLineTemplateLib')
import com.capgemini.productionline.configuration.*
Jenkins jenkinsConfiguration = new Jenkins();
```