We just started getting this issue again after updating to Jenkins 2.204.2 and the Hashicorp Vault Plugin (https://github.com/jenkinsci/hashicorp-vault-plugin) from 2.5.0 to 3.1.1. Error is,
FATAL: nulljava.lang.NullPointerException at com.datapipe.jenkins.vault.VaultBuildWrapper.provideEnvironmentVariablesFromVault(VaultBuildWrapper.java:139) at com.datapipe.jenkins.vault.VaultBuildWrapper.setUp(VaultBuildWrapper.java:94) at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:146) at hudson.model.Build$BuildExecution.doRun(Build.java:157) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1853) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:427)
We've rolledback the plugin to 2.5.0 but it still occurs. Verified the Global jenkins-plugin is set to KV Engine Version 1, and all the jobs are set to 1 as well. Vault server version is 1.0.2 and KV 2 is not enabled.
Oddly this only happens with triggered jobs: timer, github push/PR, triggered from another job. Running or re-building a job manually will not have this error. I opened an issue in the hashicorp-vault-plugin Github as well for this: https://github.com/jenkinsci/hashicorp-vault-plugin/issues/81
Other information:
- Jenkins Master OS: Ubuntu 18.04.4
- Jenkins Version: 2.204.2
- Vault Plugin Version: 2.5.0 and 3.1.1
- Java version: OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
- Vault Server version: 1.0.2
- Jenkins jobs all run on remote jenkins agents using swarm plugin version 3.18 and Java 1.8.0-8u242 on Ubuntu 18.04
vadamec if you could share your pipeline step or UI step.
What most likely is the case is you have not set `engineVersion`