Created
August 29, 2019 16:46
-
-
Save halkeye/9a00ea75897c4c0944651ad4edc2e83b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
# Assuming "anonymous read access" has been enabled on your Jenkins instance. | |
# JENKINS_URL=[root URL of Jenkins master] | |
JENKINS_URL=https://ci.blueocean.io | |
# JENKINS_URL=https://jenkins.gavinmogan.com | |
# JENKINS_CRUMB is needed if your Jenkins master has CRSF protection enabled as it should | |
JENKINS_CRUMB=`curl -qs "$JENKINS_URL/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)"` | |
curl -q -X POST -H $JENKINS_CRUMB -F "jenkinsfile=<Jenkinsfile" $JENKINS_URL/pipeline-model-converter/validate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment