diff --git a/dockerfiles/ci-tools/Dockerfile b/dockerfiles/ci-tools/Dockerfile index 5a56838242f226f573abe598399071f287650ecc..b9430265d4851c3e1616fce94f146f332c67cb9f 100644 --- a/dockerfiles/ci-tools/Dockerfile +++ b/dockerfiles/ci-tools/Dockerfile @@ -35,6 +35,8 @@ RUN mkdir -p ~/.ssh RUN echo "Host *\n\tStrictHostKeyChecking no" > ~/.ssh/config COPY ssh-addkey.sh /usr/local/bin/ssh-addkey COPY python-gitlab-set-private-token.sh /usr/local/bin/python-gitlab-set-private-token +COPY report_badge.py /usr/local/bin/report_badge +COPY report_compare.py /usr/local/bin/report_compare COPY entrypoint.sh /usr/local/bin/entrypoint ENTRYPOINT [ "/bin/bash", "/usr/local/bin/entrypoint" ] diff --git a/templates/report/changes.yml b/templates/report/changes.yml index f3edf8444b7a71a8c969c408c8ecf9405d05b150..67f1bd2593ab7602fcc62afe9cff994b7b9fc3ce 100644 --- a/templates/report/changes.yml +++ b/templates/report/changes.yml @@ -11,9 +11,15 @@ report_changes: - if: $CI_AWE_RUN_REPORT_CHANGES - !reference [.primary_ref_jobs, rules] script: - - 'curl --output "$REPORT_CHANGES_FILE.old" --location --header "JOB-TOKEN: $CI_JOB_TOKEN" "$REPORT_CHANGES_ARTIFACT_URL"' - - report_compare "$REPORT_CHANGES_FILE.old" "$REPORT_CHANGES_ARTIFACT_FILE" report_changes.xml - - junitparser verify report_changes.xml + - | + if ! junitparser verify "$REPORT_CHANGES_ARTIFACT_FILE"; then + echo "Test report of this pipeline contains failures. Comparing it to the previous run." + # Download the report of the previous pipeline. + curl --output "$REPORT_CHANGES_FILE.old" --location --header "JOB-TOKEN: $CI_JOB_TOKEN" "$REPORT_CHANGES_ARTIFACT_URL" + # Compare it to the report of this pipeline. + report_compare "$REPORT_CHANGES_FILE.old" "$REPORT_CHANGES_ARTIFACT_FILE" report_changes.xml + junitparser verify report_changes.xml + fi artifacts: expire_in: 1 day reports: