Skip to content

Instantly share code, notes, and snippets.

@krissrex
Created October 23, 2017 11:43
Show Gist options
  • Save krissrex/a45a613641c414114dfefaf357b4344e to your computer and use it in GitHub Desktop.
Save krissrex/a45a613641c414114dfefaf357b4344e to your computer and use it in GitHub Desktop.
Save as jenkins-cli with chmod +x in /usr/bin
#!/bin/bash
# Put jenkins-cli.jar and jenkinsAuth.txt in ~/.jenkins-cli/
# In jenkinsAuth.txt, put username:API-token
JENKINS_PATH="~/.jenkins-cli"
JENKINS_URL="https://jenkins.somesite.com/"
java -jar $JENKINS_PATH/jenkins-cli.jar -auth @$JENKINS_PATH/jenkinsAuth.txt -s "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment