我有以下要转换为声明性语法的管道。
podTemplate(
cloud: "OCP_CLUSTER",
name: "CENTRAL_POD",
label: "CENTRAL_POD",
namespace: "CENTRAL_NS",
inheritFrom: "my_pod_image")
{
podTemplate(
cloud: "OCP_CLUSTER",
name: "INTERNAL_POD",
label: "INTERNAL_PROD",
namespace: "MS_NS",
inheritFrom: "my_pod_image")
{
node("CENTRAL_POD") {
stage('Project Setup') {
create_k8s_ns('CREATE', "MS_NS")
}
node("INTERNAL_PROD") {
stage('Clone sources') {
echo "..."
}
}
}
}
}
我检查了以下链接,但没有找到解决方案。 https://github.com/jenkinsci/kubernetes-plugin#nesting-pod-templates
声明性语法是否支持相同的选项?