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
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?
Oleg Nenashev is correct - we should probably add something to the kubernetes plugin's Declarative agent setup for doing a readTrusted of a YAML file for this sort of use case.
[~oleg_nenashev] I expect to read k8s-podspec.yaml from the repository. We would like the yaml file to be part of the source code on a separate file. For now we're including the yaml contents in the Jenkinsfile.