jenkinsci / templating-engine-plugin

create tool-agnostic, templated pipelines to be shared by multiple teams
https://jenkinsci.github.io/templating-engine-plugin/latest/
Apache License 2.0
171 stars 59 forks source link

caching the same repository avoid reload multiple time on the same build #340

Open arechavarria opened 3 weeks ago

arechavarria commented 3 weeks ago

PR Details

Description

It has been observed that the library makes more repository queries than necessary, which is redundant unless the libraries are stored in different remote repositories. However, each repository only needs to be queried once, and its content should be cached and associated with the execution to avoid impacting future or concurrent runs. This will shorten the initialization time for pipelines using the library

How Has This Been Tested

Tests are conducted on different types of pipelines, including multibranch and simple pipelines, to analyze the previous behavior. The results show a significant reduction in pipeline initialization time

This behavior only affects how remote repositories are queried when the libraries come from a source control management (SCM) system.

Types of Changes

Checklist