Load Jenkins Pipeline Shared Library from same repository

前端 未结 7 2276
北恋
北恋 2021-01-31 07:52

TL;DR Is there a way to import code into the Jenkinsfile from the local repository (other than the load step)?

Why?

I\'ve ex

7条回答
  •  忘掉有多难
    2021-01-31 08:44

    Wanted to do the same and ended up creating this:

    https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/37

    and here is how I use it:

    https://github.com/syndesisio/syndesis-pipeline-library/blob/master/Jenkinsfile#L3

    In my case I wanted to create a Jenkinsfile that actually tests the pipeline library that the repository contains.

    Let me know what you think and feel free to add your comments on the PR too.

提交回复
热议问题