[JIRA] (JENKINS-60339) Inherit pod template from shared libary for declarative pipeline

2 views
Skip to first unread message

pavan_hemadri@hotmail.com (JIRA)

unread,
Dec 2, 2019, 2:28:02 AM12/2/19
to jenkinsc...@googlegroups.com
Kalyana Pavan Hemadri created an issue
 
Jenkins / Improvement JENKINS-60339
Inherit pod template from shared libary for declarative pipeline
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: kubernetes-plugin
Created: 2019-12-02 07:27
Environment: Jenkins version 2.196
Kubernetes Plugin version 1.21
Priority: Minor Minor
Reporter: Kalyana Pavan Hemadri

In scripted pipelines we can inherit a pod template that was defined in either jenkinsfile or shared library. As such there is no way to do the same with declarative pipeline.

For declarative pipelines we should define a pod template in Manage Jenkins -> Configure System and use them with "InheritFrom" in kubernetes agent block before yaml.

It would be helpful to support inheriting pod templates from shared libraries in declarative pipelines too. Our organization runs multiple pipelines with multple centos based containers. I would like to separate all pod infra configurations (like mounts, resources etc) in to shared libraries and inherit it in to build pod using yaml merge strategy. Defining all those pod templates in jenkins system configuration looks awkward though.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages