Skip to content

Instantly share code, notes, and snippets.

@zahna
Created November 30, 2016 18:14
Show Gist options
  • Select an option

  • Save zahna/e5d122ebf8395d3340eefb412573fbeb to your computer and use it in GitHub Desktop.

Select an option

Save zahna/e5d122ebf8395d3340eefb412573fbeb to your computer and use it in GitHub Desktop.
#!/bin/sh
# This is run by a cron job. It periodically checks our repository and triggers a new jenkins run.
cd /var/www/bg/current
output=$(git pull)
if [ "$output" != "Already up-to-date." ]; then
curl -sS http://127.0.0.1:8080/job/BG5/build?token=bg5isthecoolest
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment