Skip to content

Commit

Permalink
refactor: remove TC environment variable check in run_bats_tests_in_d…
Browse files Browse the repository at this point in the history
…ocker.bash

- Now only check if BUILDX_BUILDER variable is set before proceeding.

Issue NMO-571
  • Loading branch information
RedLeader962 committed Aug 6, 2024
1 parent 6f2d1ed commit 5ec56fd
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/bats_testing_tools/run_bats_tests_in_docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,11 @@ fi
test -d "${N2ST_BATS_TESTING_TOOLS_ABS_PATH}" || exit 1
test -f "${N2ST_BATS_TESTING_TOOLS_RELATIVE_PATH}/bats_helper_functions.bash" || exit 1

# //// DEV ////////////////////////////////////////////////////////////////////////////////////////


# ====Begin========================================================================================
n2st::norlab_splash "${PROJECT_PROMPT_NAME}" "${PROJECT_GIT_REMOTE_URL}"
n2st::print_formated_script_header "$(basename $0) ${MSG_END_FORMAT}on device ${MSG_DIMMED_FORMAT}$(hostname -s)" "${MSG_LINE_CHAR_BUILDER_LVL2}"

n2st::set_is_teamcity_run_environment_variable
n2st::print_msg "IS_TEAMCITY_RUN=${IS_TEAMCITY_RUN} ${TC_VERSION}"
if [[ ${IS_TEAMCITY_RUN} != true ]] && [[ -z ${BUILDX_BUILDER} ]]; then
if [[ -z ${BUILDX_BUILDER} ]]; then
# Note: Default to default buildx builder (ie native host architecture) so that the build img
# be available in the local image store and that run executed via `up_and_attach.bash` doesn't
# require pulling built img from dockerhub.
Expand All @@ -79,9 +75,7 @@ if [[ ${IS_TEAMCITY_RUN} != true ]] && [[ -z ${BUILDX_BUILDER} ]]; then
# Force builder initialisation
docker buildx inspect --bootstrap $BUILDX_BUILDER >/dev/null
fi
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ DEV \\\\

# ====Begin========================================================================================
# ....Execute docker steps.........................................................................
# Note:
# - CONTAINER_PROJECT_ROOT_NAME is for copying the source code including the repository root (i.e.: the project name)
Expand Down

0 comments on commit 5ec56fd

Please sign in to comment.