github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/deploy/test-in-docker/entrypoint.sh (about)

     1  #!/bin/bash
     2  
     3  BUCKET=docker_local_bucket
     4  AISTORE_PATH=$GOPATH/src/github.com/NVIDIA/aistore
     5  
     6  if [ ${CLD_PROVIDER} == 1 ]; then
     7      BUCKET=${HOSTNAME}
     8      aws s3api create-bucket --bucket ${BUCKET} --region ${AWS_REGION} --create-bucket-configuration LocationConstraint=${AWS_REGION}
     9  elif [ ${CLD_PROVIDER} == 2 ]; then
    10      BUCKET=smth # TODO:
    11  fi
    12  
    13  function cleanup {
    14      if [ ${CLD_PROVIDER} == 1 ]; then
    15          aws s3 rb s3://${BUCKET} --force
    16      elif [ ${CLD_PROVIDER} == 2 ]; then
    17          : # TODO: currently noop
    18      fi
    19  }
    20  trap cleanup EXIT
    21  
    22  pushd $AISTORE_PATH > /dev/null
    23  (echo -e "4\n4\n3\n${CLD_PROVIDER}" | make deploy) && sleep 5
    24  
    25  # test
    26  make aisloader cli
    27  BUCKET=${BUCKET} make test-long
    28  EXIT_CODE=$?
    29  popd > /dev/null
    30  
    31  exit ${EXIT_CODE}