-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
Problem:
Specifying yaml in pipeline prevents yaml in pod template from being applied.
In pod template setup:
Raw YAML for the Pod:
spec:
containers:
- name: "base"
startupProbe:
periodSeconds: 1
initialDelaySeconds: 1
failureThreshold: 5
exec:
command: ["/bin/sh", "-c", "ls"]
Yaml merge strategy:
Neither Merge nor Override seems to work
Test pipeline:
pipeline { agent { kubernetes { inheritFrom 'my-template' // works! //containerTemplate(name: "python3", image: "python:3.7-slim", command: 'sleep', args: '99d') // fails! => yaml above from template is never applied yaml ''' spec: containers: - args: - "99d" command: - "sleep" image: "python:3.7-slim" imagePullPolicy: "IfNotPresent" name: "python3" ''' } } stages { stage('Test') { steps { container('base') { sh ''' echo "hello world!" ''' } } } } }
Any explanation and fix for this ?