jenkinsci / jenkinsci/gitlab-plugin

Use @Library to load shared pipeline

Open
#485 3 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

The plugin [workflow-cps-global-lib-plugin](https://github.com/jenkinsci/workflow-cps-global-lib-plugin/) offers the @Library annotation to load a shared library. Quote from the ReadMe :

> Other plugins may add ways of defining libraries on the fly just based on name. For example, the GitHub Organization Folder plugin allows a script to use an (untrusted) library named something like github.com/someorg/somerepo without any Jenkins configuration at all: the specified GitHub repository is loaded, by default in the master branch, using an anonymous checkout.

I've used this feature with github, it's really powerful. It could be really great to have the same option for gitlab.

Temporary Workarounds

- use a git submodule to share the common stuff => requires to update every projects and commit on each pipeline change
- clone and load the library repository manually => crappy code that should be copy-pasted in all projects
Please share if you have any other approach, not sure if I read everything about this plugin.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.