-
New Feature
-
Resolution: Fixed
-
Minor
-
None
When creating a Jenkinsfile I'd like to read the pom template from an external yaml, and not from embedded yaml in the agent definition yaml field which is harder to edit
- is duplicated by
-
JENKINS-51255 Kubernetes plugin declarative pipeline can't use readFile to read yaml file
-
- Fixed but Unreleased
-
- is related to
-
JENKINS-55299 Read pod template yaml from library resource
-
- Closed
-
- relates to
-
JENKINS-56943 Loading yamlFile not working with parameterized git branch
-
- Resolved
-
- links to
I think the solution here is to add a yamlFile or whatever parameter for the Kubernetes agent type, and modify KubernetesDeclarativeAgentScript to check if that parameter is given, and then assuming it is and the scm object in the Pipeline context is non-null (i.e., this is either a multibranch Pipeline or a standalone Pipeline with "Pipeline from SCM"), it would use readTrusted to load the yaml and pass it on from there. Seems pretty simple.