Developing pipeline jenkinsfiles can be painful. It is slightly easier if you use the jenkinsfile runner to run them locally.
Here is the script I have been using to do that for some in-dev Jenkinsfiles. Writing down as there are some subtleties here that it is going to be easy to lose and hard to re-create.
#!/bin/bash
set -x
WHERE=${HOME}/gopath/src/github.com/grahamwhaley/kata-containers/runtime/
# We are testing against a github pull request builder (ghprb) plugin triggered job build.
GHB_PULLID=1
GHB_REPO="grahamwhaley/kata-containers-runtime"
TOKEN=<YOUR GITHUB TOKEN HERE>
# Jenkins gets pretty upset and noisy about some of the env vars we are trying to pass in, so suppress it
export JAVA_OPTS="-Dhudson.model.ParametersAction.keepUndefinedParameters=true"
#docker run --rm -v ${WHERE}:/workspace jenkinsfile-runner:my-production-jenkins \
# -a "ghprbPullId=${GHB_PULLID}" -a "ghprbGhRepository=${GHB_REPO}" -a "GITHUB_API_TOKEN=${TOKEN}" \
# 2>&1 | tee crud
docker run --rm -v ${WHERE}:/workspace \
-e JAVA_OPTS="${JAVA_OPTS}" \
jenkinsfile-runner:my-production-jenkins \
-a "ghprbPullId=${GHB_PULLID}" -a "ghprbGhRepository=${GHB_REPO}" -a "GITHUB_API_TOKEN=${TOKEN}" \
-ns \
2>&1 | tee crud