Skip to content

Instantly share code, notes, and snippets.

View orihomie's full-sized avatar
:octocat:

Orkhan orihomie

:octocat:
View GitHub Profile
#!/usr/bin/env bash
JENKINS_URL="https://user:[email protected]" #"http://<jenkins-server>"
JENKINS_URI="/job/full/path" #"my-job"
# Trigger the job with parameters
RESPONSE_FILE=/tmp/$(uuidgen).txt
response_code=$(curl -I -X POST -so "$RESPONSE_FILE" -w "%{http_code}" "${JENKINS_URL}${JENKINS_URI}/build")
if [[ "$response_code" != "201" ]]; then