Validate a declarative pipeline

Check a Jenkinsfile on the server before you 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

    Start a job and wait until it finishes, showing the console output (-f -v)

all 2 jenkins commands