Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
From part 2 of my blog post, 'Building a Deployment Pipeline Using Git, Maven, Jenkins, and GlassFish (Part 2 of 2)'
# 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" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment