Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BenjaminHerbert/ddbe2384d03a8d73292a74a55ec332e4 to your computer and use it in GitHub Desktop.
Save BenjaminHerbert/ddbe2384d03a8d73292a74a55ec332e4 to your computer and use it in GitHub Desktop.
Jenkins URLs and authentication
# Create a Jenkins job via API
curl -X POST -H "Content-Type:application/xml" -d @config.xml http://<user>:<api-token@<server>/createItem?name=<job-name>
# Download an artifact:
wget --auth-no-challenge --http-user=<user> --http-password=<user-token> http://<server>/<path-to-foobar>
curl -X GET http://<user>:<api-token@<server>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment