Commit c8984ee7 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'ci/setup_gitlab_pages_for_ci_result_presentation' into 'main'

[CI] setup gitlab pages for ci result presentation

See merge request !339
parents ecab5be6 46984d17
Loading
Loading
Loading
Loading
+36 −1
Original line number Diff line number Diff line
@@ -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:
@@ -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