diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e69d3dd99e16fa9a5901e79fe49b8f28995753ee..9bfbcb4ceb41b76263ed69bd46e2eef1c0ff5091 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,6 +76,7 @@ workflow: stages: - build - test + - deploy # --------------------------------------------------------------- # Generic script anchors @@ -241,6 +242,20 @@ stages: - python3 scripts/parse_mld_xml.py report-junit.xml $MLD_ARTIFACT_NAME + - if [ $USE_LTV -eq 1 ] && [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then + - id_previous=$(python3 get_id_of_last_job_occurence.py $CI_DEFAULT_BRANCH $CI_JOB_NAME $CI_PROJECT_ID) + - echo "Job ID from variables - $CI_JOB_ID, Job ID from script - $id_previous" + - curl --request GET "https://forge.3gpp.org/rep/api/v4/projects/$CI_PROJECT_ID/jobs/$id_previous/artifacts" --output artifacts.zip + - 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--$id_previous.csv $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--$id_previous.csv + - fi + - if [ $zero_errors != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 @@ -255,7 +270,9 @@ stages: paths: - report-junit.xml - report.html + - $CI_JOB_NAME-index.html - $MLD_ARTIFACT_NAME + - $CI_JOB_NAME-merged_csv--$CI_JOB_ID--$id_previous.csv expose_as: "pytest mld results" reports: junit: @@ -577,7 +594,7 @@ be-2-evs-26444: timeout: "120 minutes" # To be revisited script: - *print-common-info - - *update-scripts-repo + - *update-scripts-repo - sed -i".bak" "s/\(#define EVS_FLOAT\)/\/\/\1/" lib_com/options.h - make -j @@ -601,3 +618,21 @@ be-2-evs-26444: reports: junit: - report-junit.xml + +# job that sets up gitlab pages website +pages: + stage: deploy + tags: + - ivas-basop-linux + rules: + - if: $UPDATE_PAGES + script: + - *print-common-info + - *update-scripts-repo + - python3 ci/setup_pages.py + - ls + - ls public + artifacts: + paths: + - public + expire_in: 1 day