gatling-sample-framework/docker/docker-entrypoint-script.sh

27 lines
795 B
Bash
Raw Permalink Normal View History

2024-10-25 22:12:59 +00:00
#!/usr/bin/env sh
# NOTE: This script is meant to run as the entry point script for the docker container.
# Running this directly from the host system may produce unexpected results
#pipx install awscli --force
export PATH="${PATH}":/root/.local/bin
#which aws
# mvn clean install
mvn gatling:test '-DclassName=com.organization.tests.'"${TEST}"''
cid="$(awk -F/ '{print $NF}' /proc/1/cpuset)"
#cid=$(cat /dev/urandom |tr -dc 'a-zA-Z0-9'|fold -w 20|head -n 1)
echo "CID: ${cid}"
# REPORT_BUCKET="REPORT_BUCKET"
for _dir in /build/target/gatling/*/
do
zip -r test_report_"${TEST}"_"${cid}".zip "${_dir}"
# zip -r test_report.zip "${_dir}" # will be copied to /out later
# aws s3 cp --recursive --dryrun "${_dir}" s3://"${REPORT_BUCKET}"/test_report_"${TEST}"_"${cid}"/
done