Created
December 15, 2011 07:10
-
-
Save kompiro/1480152 to your computer and use it in GitHub Desktop.
Jenkinsのジョブを実行して、notify-sendする
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/bash | |
JENKINS_CLI=jenkins-cli.jar | |
if [ "$1" = "" ]; then | |
echo "Usage: build_job.sh JOB_NAME" | |
exit 1 | |
fi | |
if [ "$JENKINS_URL" = "" ]; then | |
echo "Please set JENKINS_URL environment variables." | |
exit 1 | |
fi | |
CURDIR=`dirname $0` | |
if [ ! -e $CURDIR/$JENKINS_CLI ]; then | |
echo "Downloading CLI jar" | |
DOWNLOAD_URL=$JENKINS_URL/jnlpJars/jenkins-cli.jar | |
curl -O $DOWNLOAD_URL | |
fi | |
java -jar $CURDIR/jenkins-cli.jar build -s $1 | xargs -0 notify-send |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment