-
New Feature
-
Resolution: Duplicate
-
Minor
-
None
Using the following settings declarative pipeline:
pipeline { agent { kubernetes { cloud 'OpenShift' label 'jenkins-agent-pod' yaml readFile('k8s-podspec.yaml') } } ...
Results in the following error from Jenkins:
Running in Durability level: MAX_SURVIVABILITY [Pipeline] readFile Required context class hudson.FilePath is missing Perhaps you forgot to surround the code with a step that provides this, such as: node [Pipeline] End of Pipeline
- duplicates
-
JENKINS-52259 Read pod template yaml from external file
-
- Closed
-
Not a K8s plugin defect IMHO. In Declarative the workspace is not mapped before creating the first agent, hence readFile() cannot work in this section AFAIK
From where do you expect to read it? From master? or from the repo?