Created
October 19, 2017 12:04
-
-
Save mathiassmichno/cd2099efa9e9513f61a218951b244627 to your computer and use it in GitHub Desktop.
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
PROFILE="$1" | |
[ -f $HOME/$PROFILE/options ] && . $HOME/$PROFILE/options | |
[ -n "$JENKINS_URL" ] || exit 0 | |
[ -n "$JENKINS_NODENAME" ] || exit 0 | |
JENKINS_WORKDIR="$HOME/$PROFILE" | |
JENKINS_BUILDDIR="$JENKINS_WORKDIR/build" | |
cd "$JENKINS_WORKDIR" | |
echo "Starting download" | |
curl -s -o slave.jar $JENKINS_URL/jnlpJars/slave.jar | |
echo "Starting slave" | |
cd "$JENKINS_BUILDDIR" | |
java -jar ../slave.jar -jnlpUrl $JENKINS_URL/computer/$JENKINS_NODENAME/slave-agent.jnlp |
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
PROFILE="$1" | |
[ -f $HOME/$PROFILE/options ] && . $HOME/$PROFILE/options | |
[ -n "$JENKINS_URL" ] || exit 0 | |
[ -n "$JENKINS_NODENAME" ] || exit 0 | |
JENKINS_WORKDIR="$HOME/$PROFILE" | |
JENKINS_BUILDDIR="$JENKINS_WORKDIR/build" | |
cd "$JENKINS_WORKDIR" | |
echo "Starting download" | |
curl -s -o slave.jar $JENKINS_URL/jnlpJars/slave.jar | |
echo "Starting slave" | |
cd "$JENKINS_BUILDDIR" | |
java -jar ../slave.jar -jnlpUrl $JENKINS_URL/computer/$JENKINS_NODENAME/slave-agent.jnlp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment