From b606ec6752c509b799bfff33dd6c27cfa7cf9131 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 8 Oct 2021 12:08:43 +1100 Subject: [PATCH] ci(buildkite): add agent control to standalone job (#2469) --- .buildkite/hooks/post-command | 6 +++--- .buildkite/steps/e2etests.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index 9817ef9a..490ff8eb 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -13,12 +13,12 @@ if [[ ! "${BUILDKITE_BRANCH}" =~ ^(v.*) ]] && [[ "${BUILDKITE_COMMAND_EXIT_STATU if [[ "${BUILDKITE_LABEL}" == ":hammer_and_wrench: Unit Test" ]] || [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then echo "--- :codecov: Upload coverage reports" NAME="UnitTest" + if [[ "${SUITE}" != "" ]]; then + NAME=${SUITE} + fi if [[ "${BUILDKITE_AGENT_META_DATA_CODECOV}" == "verbose" ]]; then BUILDKITE_AGENT_META_DATA_CODECOV="-v" fi - if [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then - NAME=$(echo ${BUILDKITE_LABEL/:selenium: /} | awk '{ print $1 }') - fi codecov -Z -c -f 'coverage*.txt' -n ${NAME} -F backend "${BUILDKITE_AGENT_META_DATA_CODECOV}" if [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then cd web && pnpm report diff --git a/.buildkite/steps/e2etests.sh b/.buildkite/steps/e2etests.sh index 7195187f..286967fd 100755 --- a/.buildkite/steps/e2etests.sh +++ b/.buildkite/steps/e2etests.sh @@ -23,10 +23,19 @@ cat << EOF agents: suite: "kubernetes" EOF +elif [[ "${SUITE_NAME}" = "Standalone" ]]; then +cat << EOF + agents: + suite: "standalone" +EOF else cat << EOF agents: suite: "all" EOF +cat << EOF + env: + SUITE: "${SUITE_NAME}" +EOF fi done \ No newline at end of file