When I call readYaml()
in jenkins pipeline I get an error that such method is not available.
def parameters = readYaml(file: "public/symfony/app/config/parameters.yml.dist")
Error:
java.lang.NoSuchMethodError: No such DSL method 'readYaml' found among steps [...]
Jenkins version is 2.46.2.
I suspect the reason is Jenkins version and I need to upgrade to latest. Before I do that I would like to know if there is something else to try to solve this. I would prefer not upgrading since there are other important jobs that run there.
You need to install the pipeline utility steps plugin to use that function.
You can install it via the Jenkins plugin manager.
If you are running jenkins inside a container, you could also simply adjust the official image:
FROM jenkins/jenkins:2.46.2
RUN /usr/local/bin/install-plugins.sh pipeline-utility-steps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With