Skip to content

clean-templates/ci-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins Shared Library - CI Library

This is a Jenkins Shared Library that provides reusable pipeline steps for CI/CD workflows.

Structure

The library follows the standard Jenkins Shared Library structure:

  • src/: Contains Groovy classes that can be imported and used in pipeline scripts
  • vars/: Contains global variables/functions that can be called directly from pipeline scripts
  • resources/: Contains non-Groovy files that can be loaded via the libraryResource step

Available Steps

helloWorld

A simple step that echoes "Hello world from the library!".

Usage

// In your Jenkinsfile
@Library('ci-library') _

pipeline {
    agent any
    stages {
        stage('Hello') {
            steps {
                helloWorld()
            }
        }
    }
}

How to Use This Library in Jenkins

  1. In Jenkins, go to Manage Jenkins > Configure System
  2. Scroll down to the "Global Pipeline Libraries" section
  3. Click "Add" to add a new library
  4. Fill in the following details:
    • Name: ci-library
    • Default version: main
    • Retrieval method: Modern SCM
    • Select Git and provide the repository URL
  5. Save the configuration

Now you can use the library in your Jenkinsfiles as shown in the examples above.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages