Created
August 11, 2017 15:07
-
-
Save mbruzek/d7f758bc38425062f12121416495a038 to your computer and use it in GitHub Desktop.
A script to kick off a parameterized build for Jenkins
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 | |
# Send a file to a Jenkins build using curl. | |
# The first parameter must be the URL of the Jenkins job to build. | |
# The second parameter must be the local file to send to Jenkins. | |
url=$1 | |
local_file=$2 | |
# curl $JENKINS_URL/job/$JOB_NAME/build -F file_key=@file_path -F json='{"parameter": [{"name": "param_name", "file": "file_key"}]}' | |
curl $url -F local_file=@${local_file} -F json='{"parameter": [{"name": "overcloudrc", "file": "local_file"}]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment