CI: convert to use the new S3 server instead of the legacy minio

We don't need to login anymore, but we can't use plain minio commands
now. `ci-fairy` got a helper as `s3cp` to keep an almost identical
API.

Solved Conflicts:
	.gitlab-ci/common/init-stage2.sh
	.gitlab-ci/container/lava_build.sh
	.gitlab-ci/prepare-artifacts.sh
	src/amd/ci/traces-amd.yml
	src/freedreno/ci/traces-freedreno.yml
	src/gallium/frontends/lavapipe/ci/traces-lavapipe.yml

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
(cherry picked from commit 67cee534a88c95a8eb6839f7bcf28a5e6dac8fbf)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19604>
This commit is contained in:
Benjamin Tissoires 2022-10-13 21:25:38 +02:00 committed by Marge Bot
parent 4827c3c6d5
commit 2ae65f578b
18 changed files with 25 additions and 33 deletions

View File

@ -8,7 +8,7 @@ variables:
rm download-git-cache.sh rm download-git-cache.sh
set +o xtrace set +o xtrace
CI_JOB_JWT_FILE: /minio_jwt CI_JOB_JWT_FILE: /minio_jwt
MINIO_HOST: minio-packet.freedesktop.org MINIO_HOST: s3.freedesktop.org
# per-pipeline artifact storage on MinIO # per-pipeline artifact storage on MinIO
PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID} PIPELINE_ARTIFACTS_BASE: ${MINIO_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
# per-job artifact storage on MinIO # per-job artifact storage on MinIO
@ -262,9 +262,7 @@ make git archive:
# compress the current folder # compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz . - tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
# login with the JWT token file - ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
- ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
- ci-fairy minio cp ../$CI_PROJECT_NAME.tar.gz minio://$MINIO_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
# Sanity checks of MR settings and commit logs # Sanity checks of MR settings and commit logs

View File

@ -150,8 +150,7 @@ cleanup
# upload artifacts # upload artifacts
if [ -n "$MINIO_RESULTS_UPLOAD" ]; then if [ -n "$MINIO_RESULTS_UPLOAD" ]; then
tar -czf results.tar.gz results/; tar -czf results.tar.gz results/;
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"; ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.gz https://"$MINIO_RESULTS_UPLOAD"/results.tar.gz;
ci-fairy minio cp results.tar.gz minio://"$MINIO_RESULTS_UPLOAD"/results.tar.gz;
fi fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such # We still need to echo the hwci: mesa message, as some scripts rely on it, such

View File

@ -244,7 +244,6 @@ popd
. .gitlab-ci/container/container_post_build.sh . .gitlab-ci/container/container_post_build.sh
############### Upload the files! ############### Upload the files!
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}"
FILES_TO_UPLOAD="lava-rootfs.tgz \ FILES_TO_UPLOAD="lava-rootfs.tgz \
$KERNEL_IMAGE_NAME" $KERNEL_IMAGE_NAME"
@ -253,9 +252,9 @@ if [[ -n $DEVICE_TREES ]]; then
fi fi
for f in $FILES_TO_UPLOAD; do for f in $FILES_TO_UPLOAD; do
ci-fairy minio cp /lava-files/$f \ ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/$f \
minio://${MINIO_PATH}/$f https://${MINIO_PATH}/$f
done done
touch /lava-files/done touch /lava-files/done
ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/done https://${MINIO_PATH}/done

View File

@ -23,8 +23,7 @@ KERNEL_IMAGE_BASE_URL="https://${BASE_SYSTEM_HOST_PATH}" \
artifacts/ci-common/generate-env.sh > results/job-rootfs-overlay/set-job-env-vars.sh artifacts/ci-common/generate-env.sh > results/job-rootfs-overlay/set-job-env-vars.sh
tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ . tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ .
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}" ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}"
ci-fairy minio cp job-rootfs-overlay.tar.gz "minio://${JOB_ROOTFS_OVERLAY_PATH}"
touch results/lava.log touch results/lava.log
tail -f results/lava.log & tail -f results/lava.log &

View File

@ -3,7 +3,7 @@
set -ex set -ex
INSTALL=$(realpath -s "$PWD"/install) INSTALL=$(realpath -s "$PWD"/install)
MINIO_ARGS="--credentials=/tmp/.minio_credentials" MINIO_ARGS="--token-file ${CI_JOB_JWT_FILE}"
RESULTS=$(realpath -s "$PWD"/results) RESULTS=$(realpath -s "$PWD"/results)
mkdir -p "$RESULTS" mkdir -p "$RESULTS"
@ -103,8 +103,8 @@ replay_minio_upload_images() {
__DESTINATION_FILE_PATH="$__MINIO_TRACES_PREFIX/${line##*-}" __DESTINATION_FILE_PATH="$__MINIO_TRACES_PREFIX/${line##*-}"
fi fi
ci-fairy minio cp $MINIO_ARGS "$RESULTS/$__PREFIX/$line" \ ci-fairy s3cp $MINIO_ARGS "$RESULTS/$__PREFIX/$line" \
"minio://${__MINIO_PATH}/${__DESTINATION_FILE_PATH}" "https://${__MINIO_PATH}/${__DESTINATION_FILE_PATH}"
done done
} }
@ -139,8 +139,6 @@ if [ "$RUN_CMD_WRAPPER" ]; then
RUN_CMD="set +e; $RUN_CMD_WRAPPER "$(/usr/bin/printf "%q" "$RUN_CMD")"; set -e" RUN_CMD="set +e; $RUN_CMD_WRAPPER "$(/usr/bin/printf "%q" "$RUN_CMD")"; set -e"
fi fi
ci-fairy minio login $MINIO_ARGS --token-file "${CI_JOB_JWT_FILE}"
# The replayer doesn't do any size or checksum verification for the traces in # The replayer doesn't do any size or checksum verification for the traces in
# the replayer db, so if we had to restart the system due to intermittent device # the replayer db, so if we had to restart the system due to intermittent device
# errors (or tried to cache replayer-db between runs, which would be nice to # errors (or tried to cache replayer-db between runs, which would be nice to

View File

@ -54,6 +54,5 @@ if [ -n "$MINIO_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage # Pass needed files to the test stage
MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz" MINIO_ARTIFACT_NAME="$MINIO_ARTIFACT_NAME.tar.gz"
gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME} gzip -c artifacts/install.tar > ${MINIO_ARTIFACT_NAME}
ci-fairy minio login --token-file "${CI_JOB_JWT_FILE}" ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${MINIO_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
ci-fairy minio cp ${MINIO_ARTIFACT_NAME} minio://${PIPELINE_ARTIFACTS_BASE}/${MINIO_ARTIFACT_NAME}
fi fi

View File

@ -79,7 +79,7 @@
- results/summary/ - results/summary/
- results/*.txt - results/*.txt
variables: variables:
PIGLIT_REPLAY_EXTRA_ARGS: --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_host=minio-packet.freedesktop.org --minio_bucket=mesa-tracie-public --role-session-name=${CI_PROJECT_PATH}:${CI_JOB_ID} --jwt-file=${CI_JOB_JWT_FILE} PIGLIT_REPLAY_EXTRA_ARGS: --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_bucket=mesa-tracie-public --jwt-file=${CI_JOB_JWT_FILE}
script: script:
- install/piglit/piglit-traces.sh - install/piglit/piglit-traces.sh

View File

@ -219,12 +219,12 @@ Enable the site and restart nginx:
sudo service nginx restart sudo service nginx restart
# First download will hit the internet # First download will hit the internet
wget http://localhost/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace
# Second download should be cached. # Second download should be cached.
wget http://localhost/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace
Now, set ``download-url`` in your ``traces-*.yml`` entry to something like Now, set ``download-url`` in your ``traces-*.yml`` entry to something like
``http://10.42.0.1:8888/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public`` ``http://10.42.0.1:8888/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public``
and you should have cached downloads for traces. Add it to and you should have cached downloads for traces. Add it to
``FDO_HTTP_CACHE_URI=`` in your ``config.toml`` runner environment lines and you ``FDO_HTTP_CACHE_URI=`` in your ``config.toml`` runner environment lines and you
can use it for cached artifact downloads instead of going all the way to can use it for cached artifact downloads instead of going all the way to

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "http://192.168.40.131:8888/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "http://192.168.40.131:8888/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
- path: 0ad/0ad.trace - path: 0ad/0ad.trace

View File

@ -271,7 +271,7 @@ a630-traces-restricted:
- .freedreno-rules-restricted - .freedreno-rules-restricted
variables: variables:
PIGLIT_REPLAY_DESCRIPTION_FILE: "/install/restricted-traces-freedreno.yml" PIGLIT_REPLAY_DESCRIPTION_FILE: "/install/restricted-traces-freedreno.yml"
PIGLIT_REPLAY_EXTRA_ARGS: --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_host=minio-packet.freedesktop.org --minio_bucket=mesa-tracie-private --role-session-name=${CI_PROJECT_PATH}:${CI_JOB_ID} --jwt-file=${CI_JOB_JWT_FILE} PIGLIT_REPLAY_EXTRA_ARGS: --keep-image --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_bucket=mesa-tracie-private --jwt-file=${CI_JOB_JWT_FILE}
allow_failure: true allow_failure: true
a630-traces-performance: a630-traces-performance:

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "http://10.42.0.1:8888/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-private/" download-url: "http://10.42.0.1:8888/cache/?uri=https://s3.freedesktop.org/mesa-tracie-private/"
traces: traces:
# takes approx. 70 seconds # takes approx. 70 seconds

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
- path: 0ad/0ad-v2.trace - path: 0ad/0ad-v2.trace

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "https://s3.freedesktop.org/mesa-tracie-public/"
# glmark2 looks like maybe it fails due to wanting an xserver, but we don't have # glmark2 looks like maybe it fails due to wanting an xserver, but we don't have
# Xorg in the x86 docker images we're using. # Xorg in the x86 docker images we're using.

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
- path: 0ad/0ad-v2.trace - path: 0ad/0ad-v2.trace

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
# Crash in crosvm: ../src/dispatch_common.c:858: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed. # Crash in crosvm: ../src/dispatch_common.c:858: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
- path: glmark2/desktop:windows=4:effect=blur:blur-radius=5:passes=1:separable=true-v2.trace - path: glmark2/desktop:windows=4:effect=blur:blur-radius=5:passes=1:separable=true-v2.trace

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "http://caching-proxy/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "http://caching-proxy/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
# - path: 0ad/0ad-v2.trace # - path: 0ad/0ad-v2.trace

View File

@ -1,5 +1,5 @@
traces-db: traces-db:
download-url: "http://caching-proxy/cache/?uri=https://minio-packet.freedesktop.org/mesa-tracie-public/" download-url: "http://caching-proxy/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/"
traces: traces:
- path: behdad-glyphy/glyphy-v2.trace - path: behdad-glyphy/glyphy-v2.trace