mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01:00
Up until now, every project using CI-Tron had to write their own job submission flow because CI-Tron itself was not providing any official way of interacting with it via GitLab. This however changed, and the solution is vastly superior to what we have been using in Mesa: * Ability to pass all the environment variables of the job to the DUT, so no need to remember to add variables in `export-gitlab-job-env-for-dut.sh` anymore * No dependency on Mesa code, which means no need to wait on python-artifacts and the ability to replicate a run by just copying the job description outputted by the job \o/ * Ability to have as many initrd, HTTP, and TFTP artifacts as wanted * Ability to expose a variable through a TFTP/HTTP endpoint or as an initrd * Ability to overwrite the platform environment (machine-specific FW) * Ability to have as many kernel cmdline variables, all merged when generating the final cmdline. This makes it easy to share some snippets of cmdline between jobs Transitioning from the custom to the generic template is however pretty involved. This commit does the minimum changes needed to switch to the new model, often simply replacing the B2C_ prefix with CI_TRON_. Further renaming of "b2c" prefixes into "ci-tron" is left for future commits. Co-authored-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34795>
30 lines
955 B
Bash
Executable file
30 lines
955 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# shellcheck disable=SC1091 # relative paths only become valid at runtime
|
|
|
|
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
|
|
|
section_switch prepare-artifacts "artifacts: prepare"
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
mkdir -p artifacts/
|
|
|
|
# Test runs don't pull down the git tree, so put the dEQP helper
|
|
# script and associated bits there.
|
|
cp -Rp .gitlab-ci/report-flakes.py artifacts/
|
|
cp -Rp .gitlab-ci/setup-test-env.sh artifacts/
|
|
cp -Rp .gitlab-ci/common artifacts/ci-common
|
|
cp -Rp .gitlab-ci/bare-metal artifacts/
|
|
cp -Rp .gitlab-ci/lava artifacts/
|
|
cp -Rp .gitlab-ci/bin/*_logger.py artifacts/
|
|
|
|
if [ -n "$S3_ARTIFACT_NAME" ]; then
|
|
# Pass needed files to the test stage
|
|
S3_ARTIFACT_TAR="$S3_ARTIFACT_NAME.tar.zst"
|
|
tar c artifacts/ | zstd -o "${S3_ARTIFACT_TAR}"
|
|
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_TAR}"
|
|
rm "${S3_ARTIFACT_TAR}"
|
|
fi
|
|
|
|
section_end prepare-artifacts
|