DevOps- Multi Branching

Multi Branch Pipeline-

→ Multi Branch Pipeline in jenkins will automatically create jenkins pipelines for different branches in source code repository.

→ Dynamically it will discovers branches containing jenkinsfile and setup pipeline to corresponding branches.

→ It will eliminate the need for manual creation for individual pipeline creation for each.

Creating a multi-branch pipeline:

→ create a multibranch pipeline

→ configure the git hub details

→ Configure Triggers

Shared Libraries:

→ A shared library in Jenkins is a collection of Groovy scripts shared between different Jenkins jobs. To run the scripts, they are pulled into a Jenkins file. Each shared library requires users to define a name and a method of retrieving source code. These methods include local files, Git repositories, and Jenkins SCM plugins.

For Example:

The email notification code is common for every pipeline, instead of configure that source code in every pipeline we can create a shared a library and configure the email notification source code in it and calls that shared library in the pipeline.

→ This is the source code that is configured in the shared library. And this shared libraries can be created in separate SCM repository.

→ Configure the shared libraries in the jenkins

→ The shared library have to be configured in the pipeline

0
Subscribe to my newsletter

Read articles from Sandhya Kalikiri directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sandhya Kalikiri
Sandhya Kalikiri