Well, Groovy is a bit of a basket case programming language, so that doesn't help.
I say this as someone that built entire Jenkins Groovy frameworks for automating large Jenkins setups (think hundreds of nodes, thousands of Jenkins jobs, stuff like that).
In my experience include/extends works well for importing or extending whole jobs, but not so much for defining a small snippet of text that I want to reuse across many jobs, perhaps when overriding stuff.
An example of how I normally use them and why I still find them useful:
# Imports whole pipeline architecture jobs
include:
- project: company/ci-templates
ref: "master"
file: "languages/stack.yaml"
# Define a command I need to use exactly the same
# across different jobs I'm going to override
.vpn_connect: &vpn_connect
- cmd1
- cmd2
- cmd3 &
job1:
extends: imported1
script:
- ....
- *vpn_connect # 2nd command
- ...
job2:
extends: imported2
script:
- ...
- ...
- *vpn_connect # 3rd command
- ...
Not sure to be honest, I know a lot of these tools popped up and swiftly disappeared. It wouldn't surprise me if there is a Linux version still alive though, try searching for "Rewind.ai alternative Linux".
Yes! This architecture allows you to host your git repos on your own server, while allowing contributions from others with a unified identity (unlike say, Gitea or GitLab, where you’d have to make yet another account).