From 5aa8ddb14a4fbc1cfe38da9eb3817f9c1357d977 Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 23 Feb 2021 22:15:17 -0800 Subject: [PATCH] Allow configuration of ssh port and job count when running circle ci locally. --- script/run-circle-ci.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/script/run-circle-ci.sh b/script/run-circle-ci.sh index ebaf517ac..389835c9b 100755 --- a/script/run-circle-ci.sh +++ b/script/run-circle-ci.sh @@ -1,21 +1,37 @@ #!/bin/bash IP=$1 -PW=$2 +PORT=$2 +PW=$3 +JOB_COUNT=$4 if [[ -z "${IP}" ]]; then - echo "no file ip address specified." + echo "no ip address specified." + echo "invoke with 'run-circle-ci.sh '" + exit +fi + +if [[ -z "${PORT}" ]]; then + echo "no file port address specified." + echo "invoke with 'run-circle-ci.sh '" exit fi if [[ -z "${PW}" ]]; then echo "no scp password address specified." + echo "invoke with 'run-circle-ci.sh '" + exit +fi + +if [[ -z "${JOB_COUNT}" ]]; then + echo "no job count specified." + echo "invoke with 'run-circle-ci.sh '" exit fi # pre-process the yml file, and change max processes from 2 to 7 circleci config process .circleci/config.yml > local-circle-ci.yml -sed -i 's/-j2/-j7/g' local-circle-ci.yml +sed -i "s/-j2/-j${JOB_COUNT}/g" local-circle-ci.yml ALL_JOBS=( "build_ubuntu_bionic" @@ -35,6 +51,7 @@ for JOB in ${ALL_JOBS[@]}; do -e CIRCLE_BRANCH=${BRANCH} \ -e CIRCLE_REPOSITORY_URL=${REPO} \ -e MUSIKCUBE_BUILD_HOST_IP=${IP} \ + -e MUSIKCUBE_BUILD_HOST_PORT=${PORT} \ -e MUSIKCUBE_BUILD_HOST_PW=${PW} \ --job ${JOB} done