Skip to content

Instantly share code, notes, and snippets.

@slaiyer
Created March 9, 2021 20:01
Show Gist options
  • Save slaiyer/f04d720d13f261831733ba75c8e11760 to your computer and use it in GitHub Desktop.
Save slaiyer/f04d720d13f261831733ba75c8e11760 to your computer and use it in GitHub Desktop.
Jenkins pipeline validator
# Get JENKINS_SESSION_COOKIE='JSESSIONID.[...]=[...]' from browser cookie jar for $JENKINS_URL while logged in
# This is in lieu of $JENKINS_URL/crumbIssuer/api/json?pretty=true not being usable
curl \
-H "cookie: $JENKINS_SESSION_COOKIE" \
-F "jenkinsfile=<$JENKINSFILE_PATH" \
$JENKINS_URL/pipeline-model-converter/validate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment