Jenkins Pipelines: Why is CPS Global Lib not loading?

后端 未结 2 703
我寻月下人不归
我寻月下人不归 2021-01-23 09:32

I\'m following the tutorial on the pipeline library plugin. I made a repository containing the following files:

D:.
│   Test.groovy
│   
├───src
└───vars
                


        
2条回答
  •  孤街浪徒
    2021-01-23 10:09

    Using the 2.8 version of Pipeline:Groovy plugin I found that if I update the groovy scripts under /vars/myscript.groovy doesn't work, but if I restart jenkins everything works fine. If I simply reload configuration from file, nothing happens.

    So I think the scripts are instantiated as global functions only when jenkins start. (but maybe I'm wrong :) )

提交回复
热议问题