X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/ae141be42b100652901903ab954defe706eea764..f4f67f9048b1df17084bbcd0f2b6b267aea9c1ce:/jenkins/run-deploy-salt.sh diff --git a/jenkins/run-deploy-salt.sh b/jenkins/run-deploy-salt.sh index a14ce0a..2463d19 100755 --- a/jenkins/run-deploy-salt.sh +++ b/jenkins/run-deploy-salt.sh @@ -35,7 +35,7 @@ function usage { echo >&2 echo >&2 "usage: $0 [options] " echo >&2 - echo >&2 " Arvados cluster name" + echo >&2 " Arvados cluster name or single node salt identifier" echo >&2 echo >&2 "$0 options:" echo >&2 " -d, --debug Enable debug output" @@ -100,7 +100,7 @@ function run_salt() { fi shift shift - ssh -o "ConnectTimeout 5" -o "LogLevel QUIET" $SALT_MASTER sudo salt --out=txt \'*$cluster*\' cmd.run \'$(IFS=\0;echo "$@")\' $E + ssh -o "ConnectTimeout 5" -o "LogLevel QUIET" $SALT_MASTER salt --out=txt \'$cluster*\' cmd.run \'$(IFS=\0;echo "$@")\' $E } if [[ -z "$SALT_MASTER" ]]; then @@ -108,7 +108,12 @@ if [[ -z "$SALT_MASTER" ]]; then exit 1 fi -run_salt $IDENTIFIER '' 'apt update && apt -y upgrade' +run_salt "*$IDENTIFIER" '' 'apt update && DEBIAN_FRONTEND=noninteractive apt -y upgrade' + +if [[ "$IDENTIFIER" =~ \. ]]; then + title "Single node deploy requested, done" + exit 0 +fi title "Loading ARVADOS_API_HOST and ARVADOS_API_TOKEN" if [[ -f "$HOME/.config/arvados/$IDENTIFIER.arvadosapi.com.conf" ]]; then @@ -138,7 +143,7 @@ if [[ "$DOCKER_IMAGES_PROJECT" == "" ]]; then fi title "Found Arvados Standard Docker Images project with uuid $DOCKER_IMAGES_PROJECT" -VERSION=$(run_salt shell.$IDENTIFIER '' 'apt-cache policy python3-arvados-cwl-runner' | grep Candidate |awk '{print $3}' |cut -f1 -d-) +VERSION=$(run_salt "shell.$IDENTIFIER" '' 'apt-cache policy python3-arvados-cwl-runner' | grep Candidate |awk '{print $3}' |cut -f1 -d-) if [[ "$?" != "0" ]] || [[ "$VERSION" == "" ]]; then title "ERROR: unable to get python3-arvados-cwl-runner version" @@ -148,7 +153,7 @@ else fi set +e -CLEAN_VERSION=`echo $VERSION |sed -e 's/~/./'` +CLEAN_VERSION=`echo $VERSION | sed s/~dev/.dev/g | sed s/~rc/rc/g` run_salt "shell.$IDENTIFIER" "'{\"ARVADOS_API_HOST\": \"$ARVADOS_API_HOST\", \"ARVADOS_API_TOKEN\": \"$ARVADOS_API_TOKEN\"}'" "arv-keepdocker" |grep -qP "arvados/jobs +$CLEAN_VERSION " if [[ $? -eq 0 ]]; then set -e