Interview Prep/Jenkins/Shared libraries

What is the directory structure of a shared library?

BeginnerConceptShared libraries
Answer
shack-lib/
├── vars/
│   ├── kanikoBuild.groovy      # global step: kanikoBuild(...)
│   └── kanikoBuild.txt         # help text shown in Global Variables Reference
├── src/
│   └── com/devopsshack/
│       └── ImageTag.groovy     # class: com.devopsshack.ImageTag
├── resources/
│   └── pods/node-build.yaml    # loaded with libraryResource
└── test/                       # JenkinsPipelineUnit tests

At least one of vars/ or src/ must exist.

All Jenkins questions Roadmap: Jenkins

More on Shared libraries