From ad03430d9eeee10a8e4523b1c52bf798a19a4565 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 3 Jun 2024 22:26:22 +0200 Subject: [PATCH] use same name in artifact and script section via variables --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d025e6d44..f0537e236 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,6 +220,8 @@ stages: timeout: "240 minutes" variables: MLD_ARTIFACT_NAME: "mld--$CI_JOB_NAME-$CI_JOB_ID--sha-$CI_COMMIT_SHORT_SHA.csv" + MERGED_CSV_ARTIFACT_NAME: "$CI_JOB_NAME--merged_csv--$CI_JOB_ID.csv" + PAGES_HTML_ARTIFACT_NAME: "$CI_JOB_NAME-index.html" script: - *print-common-info - *update-scripts-repo @@ -250,11 +252,11 @@ stages: - unzip artifacts.zip -d previous_artifacts # This wildcard thingy relies on only one csv file being present per job - file_previous="previous_artifacts/mld--ivas-pytest-mld-long-dec-$id_previous--sha-*.csv" - - python3 ci/basop-pages/create_report_pages.py $CI_JOB_NAME-index.html $CI_JOB_NAME--merged_csv--$CI_JOB_ID.csv $MLD_ARTIFACT_NAME $file_previous $CI_JOB_ID $id_previous $CI_JOB_NAME + - python3 ci/basop-pages/create_report_pages.py $PAGES_HTML_ARTIFACT_NAME $MERGED_CSV_ARTIFACT_NAME $MLD_ARTIFACT_NAME $file_previous $CI_JOB_ID $id_previous $CI_JOB_NAME - else # create empty file for artifacts to avoid errors - touch $CI_JOB_NAME-index.html - - touch $CI_JOB_NAME--merged_csv--$CI_JOB_ID.csv + - touch $MERGED_CSV_ARTIFACT_NAME - fi - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi @@ -271,10 +273,9 @@ stages: paths: - report-junit.xml - report.html - - $CI_JOB_NAME-index.html + - $PAGES_HTML_ARTIFACT_NAME - $MLD_ARTIFACT_NAME - # the * wildcard is needed because $id_previous is undefined here - - $CI_JOB_NAME-merged_csv--$CI_JOB_ID.csv + - $$MERGED_CSV_ARTIFACT_NAME expose_as: "pytest mld results" reports: junit: -- GitLab