Interview Prep/CI/CD/Rapid-Fire Commands

Rapid-fire: how do you validate a Declarative Jenkinsfile from the command line?

IntermediateProductionRapid-Fire Commands
Answer
curl -s -X POST -u "$USER:$API_TOKEN" \
  -F "jenkinsfile=<Jenkinsfile" \
  https://jenkins.example.com/pipeline-model-converter/validate
# "Jenkinsfile successfully validated." on success
java -jar jenkins-cli.jar -s $JENKINS_URL declarative-linter < Jenkinsfile
All CI/CD questions

More on Rapid-Fire Commands