-
Notifications
You must be signed in to change notification settings - Fork 197
Description
Setup:
We have lots of pipelines that rely on common code. Currently, we use "load" to load code that is shared across multiple pipelines:
Jenkins_helper = load "${someDirectory}/Jenkins_helper.groovy"
The groovy scripts come from one repo and are checked out at the beginning, the files, then loaded one by one when required.
Exception
In approximate 1 out of 1.000 pipeline runs, one random groovy file is not loaded correctly, but Jenkins loads another file. The pipeline then crashes as a method that should be called on this loaded file is naturally not present.
The checked out file in the workspaces are sane, i.e. both the wrongly loaded file and the file that should actually be loaded are ok.
No exceptions can be seen in the overall jenkins log nor in the job log
Version
We currently have Jenkins in version Version 2.462.2, but it also occurred previous versions
Originally reported by danielschuh, imported from: "load" sometimes load the wrong file
- status: Open
- priority: Minor
- component(s): workflow-cps-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 2025-12-07
Raw content of original issue
Setup:
We have lots of pipelines that rely on common code. Currently, we use "load" to load code that is shared across multiple pipelines:
Jenkins_helper = load "${someDirectory}/Jenkins_helper.groovy"
The groovy scripts come from one repo and are checked out at the beginning, the files, then loaded one by one when required.
Exception
In approximate 1 out of 1.000 pipeline runs, one random groovy file is not loaded correctly, but Jenkins loads another file. The pipeline then crashes as a method that should be called on this loaded file is naturally not present. The checked out file in the workspaces are sane, i.e. both the wrongly loaded file and the file that should actually be loaded are ok. No exceptions can be seen in the overall jenkins log nor in the job log
Version We currently have Jenkins in version Version 2.462.2, but it also occurred previous versions