Last active
December 28, 2015 01:59
-
-
Save garystafford/7424523 to your computer and use it in GitHub Desktop.
From part 2 of my blog post, 'Building a Deployment Pipeline Using Git, Maven, Jenkins, and GlassFish (Part 2 of 2)'
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/sh | |
# Call Jenkins to start build and pass environment parameter | |
# | |
echo "executing post-receive hook" | |
echo "environment=testing" | |
echo "user=jenkins" | |
# cURL POST request using jenkins user with API token | |
curl -u jenkins:{your-api-token-here} \ | |
--data "delay=0sec&environment=testing" \ | |
"{your-jenkins-server-url:port}/job/GitMavenGlassFish_Build/buildWithParameters" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment