From bfd6a92d6c59f4baf7245c5d5035d30bbaeaee0a Mon Sep 17 00:00:00 2001 From: pedro Date: Mon, 5 Feb 2024 19:18:57 +0100 Subject: [PATCH] rename from pilot test to autotest instance differentiate between instance and pilot build common arg is target (which can be pilot or instance) --- build__all.sh | 4 +++- build__common.sh | 17 ++++++++--------- ...pilot-test.sh => build__instance-autotest.sh | 5 +++-- build__pilot-lafede.sh | 2 +- build__pilot-pangea.sh | 2 +- build__pilot-setem.sh | 2 +- build__pilot-xo9b.sh | 2 +- ...yml => docker-compose__instance-autotest.yml | 0 8 files changed, 18 insertions(+), 16 deletions(-) rename build__pilot-test.sh => build__instance-autotest.sh (87%) rename docker-compose__pilot-test.yml => docker-compose__instance-autotest.yml (100%) diff --git a/build__all.sh b/build__all.sh index 9146a0b..75f2683 100755 --- a/build__all.sh +++ b/build__all.sh @@ -15,7 +15,9 @@ main() { ./build__pilot-xo9b.sh ./build__pilot-setem.sh ./build__pilot-lafede.sh - ./build__pilot-test.sh + + ./build__instance-autotest.sh + # pangea pilot the last because is the heavier # TODO enable it, temp disabled to optimize server resources #./build__pilot-pangea.sh diff --git a/build__common.sh b/build__common.sh index 805e33a..f256aa9 100644 --- a/build__common.sh +++ b/build__common.sh @@ -6,7 +6,7 @@ set -u #set -x common_start() { - figlet "${pilot}" + figlet "${target}" deployment="${1:-${deployment:-}}" action="${action:-deploy}" @@ -16,19 +16,18 @@ common_start() { detach='-d' fi - # ensure uses pilot-pangea branch and it is up to date + # ensure uses main branch branch and that it is up to date ( cd ./IdHub if [ -d .git ]; then - #git checkout ${pilot} git checkout main git pull fi ) - # some pilots might use idhub1 and/or idhub2 - idhub1="${idhub1:-idhub1__${pilot}}" - idhub2="${idhub2:-idhub2__${pilot}}" + # some targets might use idhub1 and/or idhub2 + idhub1="${idhub1:-idhub1__${target}}" + idhub2="${idhub2:-idhub2__${target}}" # force recreate rm -rf "./${idhub1}" "./${idhub2}" @@ -36,12 +35,12 @@ common_start() { common_end() { - dc_file="docker-compose__${pilot}.yml" - docker compose -p ${pilot} -f ${dc_file} down -v || true + dc_file="docker-compose__${target}.yml" + docker compose -p ${target} -f ${dc_file} down -v || true make idhub_build if [ "${action:-}" = "deploy" ]; then - docker compose -p ${pilot} -f ${dc_file} up ${detach:-} + docker compose -p ${target} -f ${dc_file} up ${detach:-} wait_seconds="${wait_seconds:-20}" echo "Give ${wait_seconds} seconds to this new deployment to be setted up" sleep "${wait_seconds}" diff --git a/build__pilot-test.sh b/build__instance-autotest.sh similarity index 87% rename from build__pilot-test.sh rename to build__instance-autotest.sh index a9a0bf7..1f3b558 100755 --- a/build__pilot-test.sh +++ b/build__instance-autotest.sh @@ -13,9 +13,10 @@ main() { # common_end . ./build__common.sh - pilot='pilot-test' + target='instance-autotest' + + idhub1="idhub__${target}" - idhub1="idhub__${pilot}" common_start # detect if is new diff --git a/build__pilot-lafede.sh b/build__pilot-lafede.sh index 0a71991..ea561fc 100755 --- a/build__pilot-lafede.sh +++ b/build__pilot-lafede.sh @@ -13,7 +13,7 @@ main() { # common_end . ./build__common.sh - pilot='pilot-lafede' + target='pilot-lafede' common_start diff --git a/build__pilot-pangea.sh b/build__pilot-pangea.sh index 4ecb1d8..f606eb0 100755 --- a/build__pilot-pangea.sh +++ b/build__pilot-pangea.sh @@ -13,7 +13,7 @@ main() { # common_end . ./build__common.sh - pilot='pilot-pangea' + target='pilot-pangea' common_start diff --git a/build__pilot-setem.sh b/build__pilot-setem.sh index c7561a3..ed38bb4 100755 --- a/build__pilot-setem.sh +++ b/build__pilot-setem.sh @@ -13,7 +13,7 @@ main() { # common_end . ./build__common.sh - pilot='pilot-setem' + target='pilot-setem' common_start diff --git a/build__pilot-xo9b.sh b/build__pilot-xo9b.sh index 300e7e4..24ccf61 100755 --- a/build__pilot-xo9b.sh +++ b/build__pilot-xo9b.sh @@ -13,7 +13,7 @@ main() { # common_end . ./build__common.sh - pilot='pilot-xo9b' + target='pilot-xo9b' common_start diff --git a/docker-compose__pilot-test.yml b/docker-compose__instance-autotest.yml similarity index 100% rename from docker-compose__pilot-test.yml rename to docker-compose__instance-autotest.yml