From part 2 of my blog post, 'Building a Deployment Pipeline Using Git, Maven, Jenkins, and GlassFish (Part 2 of 2)'
#!/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