Validate declarative pipeline

Lint a Jenkinsfile server-side before commit to catch syntax errors early

curl -X POST -F "jenkinsfile=<Jenkinsfile" https://<host>/pipeline-model-converter/validate

tool
jenkins2 commands
tags
jenkinscitroubleshooting

More jenkins commands

  • java -jar jenkins-cli.jar -s https://<host> -auth user:token build <name> -f -v

    Trigger a job and block until it finishes, streaming console output (-f -v)

all 2 jenkins commands