jenkins-lib

Jenkins shared library
git clone https://git.in0rdr.ch/jenkins-lib.git
Log | Files | Refs | Pull requests | README

README (828B)


      1 = Shared Library for Jenkins =
      2 
      3 This repo contains shared pipeline code Jenkins library, primarily shared
      4 declarative pipelines:
      5 
      6 https://www.jenkins.io/doc/book/pipeline/shared-libraries/#defining-declarative-pipelines
      7 
      8 == Library in vars folder ==
      9 
     10 The `vars/` directory can hold files with functions or entire declarative
     11 pipelines. However, only one declarative pipeline can be executed in a single
     12 build. I.e., you cannot have two declarative pipelines defined in two different
     13 files in the `var/` directory and call them from the same Jenkinsfile.
     14 
     15 == Library in src folder ==
     16 
     17 Creating an actual class in the `src/` directory gives more flexibility,
     18 because multiple of these library classes can be instantiated sequentially in
     19 the invoking Jenkinsfile (scripted pipeline).
     20 
     21 Example: https://stackoverflow.com/a/53204143