Jenkins throw error "Library expected to contain at least one of src or vars directories"

Viewed 2772

I configured Jenkins shared library with git repo which has a structure:

resources
|__ some_files
src
|__ some_files
vars
|__ some_files

But i got an error: "Library expected to contain at least one of src or vars directories". What's wrong? I have mandatory directories.

2 Answers

I got the same error. I initially set a relative path in the library path configuration which does not work and caused the error. left it blank then used the same folder structure

before:

resources
|__ some_files
src
|__ some_files
library/vars
|__ some_files

after:

resources
|__ some_files
src
|__ some_files
vars
|__ some_files

Jenkins Library Configuration

Related