From: Kienan Stewart Date: Tue, 9 Jan 2024 19:19:06 +0000 (-0500) Subject: lava: Upload artifacts as a separate test X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a593b7fa9b4aa3c905198a9fdbaf83c0b953aee9;p=lttng-ci.git lava: Upload artifacts as a separate test Change-Id: I6736aa3d1e807ef26451008cc5e2ec2f6aa93de8 Signed-off-by: Kienan Stewart --- diff --git a/lava/system-tests/kernel-tests.yml b/lava/system-tests/kernel-tests.yml index 07275eb..9610587 100644 --- a/lava/system-tests/kernel-tests.yml +++ b/lava/system-tests/kernel-tests.yml @@ -20,5 +20,3 @@ run: - lava-test-case run-tests --shell "$(dirs -l +1)/ci/scripts/system-tests/run-test-suites.sh ${LTTNG_VERSION_STRING}" - systemctl start systemd-timesyncd.service - popd - - tar czf coredump.tar.gz /tmp/coredump - - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz" diff --git a/lava/system-tests/perf-tests.yml b/lava/system-tests/perf-tests.yml index 6cd2e4e..a4e1068 100644 --- a/lava/system-tests/perf-tests.yml +++ b/lava/system-tests/perf-tests.yml @@ -20,5 +20,3 @@ run: #Need to check if the file is present for branches where the testcase was not backported - lava-test-case run-tests --shell "if [ -e perf_regression ]; then prove --nocolor --verbose --merge --exec '' - < perf_regression; else echo 'perf_regression not found'; fi" - popd - - tar czf coredump.tar.gz /tmp/coredump - - ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz" diff --git a/lava/system-tests/upload-artifacts.yml b/lava/system-tests/upload-artifacts.yml new file mode 100644 index 0000000..f03ffac --- /dev/null +++ b/lava/system-tests/upload-artifacts.yml @@ -0,0 +1,11 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: lttng-upload-artifacts + description: "Upload build artifacts" +params: + JENKINS_BUILD_ID: "invalid_jenkins_build_id" +run: + steps: + - git clone "${CI_REPO}" --branch="${CI_BRANCH}" ci + - tar czf coredump.tar.gz /tmp/coredump + - ./ci/lava/upload_artifact.sh coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz" diff --git a/scripts/system-tests/run-test-suites.sh b/scripts/system-tests/run-test-suites.sh index 2637bc4..90c4754 100755 --- a/scripts/system-tests/run-test-suites.sh +++ b/scripts/system-tests/run-test-suites.sh @@ -73,7 +73,7 @@ failed_tests=0 export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system" -make --keep-going check || failed_tests=1 +timeout 90m make --keep-going check || failed_tests=1 if [ -f "./tests/root_regression" ]; then cd "./tests" || exit 1 diff --git a/scripts/system-tests/template_lava_job.jinja2 b/scripts/system-tests/template_lava_job.jinja2 index ed60cf1..865cf1a 100644 --- a/scripts/system-tests/template_lava_job.jinja2 +++ b/scripts/system-tests/template_lava_job.jinja2 @@ -119,3 +119,13 @@ actions: CI_REPO: {{ ci_repo }} CI_BRANCH: {{ ci_branch }} {% endif %} + - repository: {{ ci_repo }} + from: git + branch: {{ ci_branch }} + path: lava/system-tests/upload-artifacts.yml + name: upload-artifacts + params: + LTTNG_VERSION_STRING: {{ lttng_version_string }} + JENKINS_BUILD_ID: {{ jenkins_build_id }} + CI_REPO: {{ ci_repo }} + CI_BRANCH: {{ ci_branch }}