Skip to content

Commit

Permalink
do nit run any checks if no_label is set
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Jan 23, 2018
1 parent db027c1 commit f21851e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jenkins/start-slave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ if [ "${CLEANUP_WORKSPACE}" = "cleanup" ] ; then ssh -n $SSH_OPTS $TARGET rm -rf
ssh -n $SSH_OPTS $TARGET mkdir -p $WORKSPACE/tmp $WORKSPACE/workspace
ssh -n $SSH_OPTS $TARGET rm -f $WORKSPACE/cmsos $WORKSPACE/slave.jar
JENKINS_CLI_OPTS="-jar ${HOME}/jenkins-cli.jar -i ${HOME}/.ssh/id_dsa -s http://localhost:8080/$(cat ${HOME}/jenkins_prefix) -remoting"
case ${SLAVE_TYPE} in
if [ $(cat ${HOME}/nodes/${JENKINS_SLAVE_NAME}/config.xml | grep '<label>' | grep 'no_label' | wc -l) -eq 0 ] ; then
case ${SLAVE_TYPE} in
*dmwm* ) echo "Skipping auto labels" ;;
aiadm* ) echo "Skipping auto labels" ;;
lxplus* )
Expand Down Expand Up @@ -67,7 +68,8 @@ case ${SLAVE_TYPE} in
done
java ${JENKINS_CLI_OPTS} groovy ${SCRIPT_DIR}/set-slave-labels.groovy "${JENKINS_SLAVE_NAME}" "${new_labs}"
;;
esac
esac
fi
if ! ssh -n $SSH_OPTS $TARGET test -f '~/.jenkins-slave-setup' ; then
java ${JENKINS_CLI_OPTS} build 'jenkins-test-slave' -p SLAVE_CONNECTION=${TARGET} -p RSYNC_SLAVE_HOME=true -s || true
fi
Expand Down

0 comments on commit f21851e

Please sign in to comment.