Created
October 23, 2018 08:28
-
-
Save sys0dm1n/2e57bcb2d34dee805c900b7968b0c3a6 to your computer and use it in GitHub Desktop.
Analyse Jenkinsfile code for potential errors
This file contains 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 | |
jenkins_base_url=http://<jenkins-url:8080>/ | |
username=<some-username> | |
apitoken=<api-token-generated-from-jenkins-dashboard> | |
curl -O $jenkins_base_url/jnlpJars/jenkins-cli.jar | |
java -jar jenkins-cli.jar -auth "$username":"$apitoken" -s "$jenkins_base_url" declarative-linter<Jenkinsfile | |
rm jenkins-cli.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment