Created
July 21, 2015 08:02
-
-
Save Integralist/bb1b1623e5229455fd7f to your computer and use it in GitHub Desktop.
Multiline Curl PUT'ing of data with no extra processing (thanks to --data-binary flag). We also use @ with a hyphen, so @- (the hyphen indicates input from stdin)
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
curl -E $DEV_CERT_PEM https://api.our-service.com/component/component-name/configuration --header 'Content-Type: application/json' --request PUT --data-binary @- <<BODY | |
[ | |
{ | |
"key": "git_ssh_private_key", | |
"value": "$(cat pri.key)", | |
"secure": true | |
}, | |
{ | |
"key": "git_ssh_public_key", | |
"value": "$(cat pub.key)", | |
"secure": true | |
}, | |
{ | |
"key": "jenkins_master_internal_hostname", | |
"value": "foo.bar.jenkins.baz.qux.my-domain.com" | |
}, | |
{ | |
"key": "cloudwatch_log_group_name", | |
"value": "live-foo-bar-jenkins-baz-main-JenkinsAgentsLogGroup-qux" | |
}, | |
{ | |
"key": "docker_registry_hostname", | |
"value": "https://jenkins.foobar.my-domain.com" | |
} | |
] | |
BODY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment