github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/k8s/scripts/buildTestImage (about)

     1  #!/usr/bin/env bash
     2  
     3  # Runs compiled go executables and specificies the test to run
     4  # Builds executable go test binaries for this repos tests
     5  
     6  set -ex
     7  
     8  SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
     9  
    10  cd "$SCRIPT_DIR"/../ || exit 1
    11  source ./scripts/buildImageHelper
    12  
    13  # get account and region
    14  REGION=
    15  TEST_BASE_VERSION="${2}"
    16  TEST_BASE_VERSION_DEFAULT=latest
    17  ACCOUNT=$(aws sts get-caller-identity | jq -r .Account)
    18  
    19  if [ "${TEST_BASE_VERSION}" = "" ]; then
    20      echo "No test-base-image version supplied in argument 3 so using the default of ${TEST_BASE_VERSION_DEFAULT}"
    21      TEST_BASE_VERSION="${TEST_BASE_VERSION_DEFAULT}"
    22  fi
    23  
    24  buildImage "${1}" "chainlink-testing-framework-tests" "Dockerfile" "--build-arg BASE_IMAGE=${ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/test-base-image --build-arg IMAGE_VERSION=${TEST_BASE_VERSION}"