Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion master-nonlatent/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ f_dockerlibrary.addStep(
"bash",
"-xc",
util.Interpolate(
'./docker-library-test.sh "%(prop:tarbuildnum)s" "%(prop:parentbuildername)s"'
'./docker-library-test.sh "%(prop:tarbuildnum)s" "%(prop:parentbuildername)s" "'
+ os.environ.get("MTR_LOG_COLLECTOR_BASE_URL")
+ '" "%(prop:branch)s" "%(prop:revision)s" "%(prop:buildername)s" "%(prop:buildnumber)s"'
Comment thread
grooverdan marked this conversation as resolved.
),
],
warnOnWarnings=True,
Expand Down
41 changes: 40 additions & 1 deletion scripts/docker-library-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ set -xeuvo pipefail

tarbuildnum=${1}
buildername=${2}
BASE_URL="$3" # e.g., http://100.64.101.1:9990
BRANCH="$4"
REVISION="$5"
PLATFORM="$6"
BBNUM="$7"

UPLOAD_URL="${BASE_URL}/upload-test-results/"
HEALTH_URL="${BASE_URL}/health"


builderarch=${buildername%%-*}

Expand Down Expand Up @@ -32,5 +41,35 @@ fi
# clean images if test does not succeed
#trap 'buildah rmi "$image"' EXIT

mariadb-docker/.test/run.sh "$image"
mariadb-docker/.test/run.sh --xml=doi.xml "$image"
Comment thread
RazvanLiviuVarzaru marked this conversation as resolved.
Outdated

if ! curl "$HEALTH_URL" \
--max-time 5 \
--retry 3 \
--retry-max-time 0 \
--retry-delay 5 \
--retry-connrefused \
--fail-with-body; then
echo "Service health check failed. Aborting uploads."
exit 2
fi

if [ ! -f doi.xml ]; then
echo "Test result file doi.xml not created"
exit 1
fi

curl \
--max-time 120 \
--connect-timeout 10 \
--fail-with-body \
-X POST "$UPLOAD_URL" \
-F "branch=${BRANCH}" \
-F "revision=${REVISION}" \
-F "platform=${PLATFORM}" \
-F "bbnum=${BBNUM}" \
-F "typ=docker_offical_images" \
-F "file=@doi.xml;type=application/xml" || exit 1
rm -f doi.xml

trap - EXIT