From dae3e92adc44aa32535c9485fa5409bbd2a1e106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 10 May 2026 15:45:54 +0200 Subject: [PATCH] ci: make curl fail if response code is not appropriate Use the `--fail{,-with-body}` options of curl to ensure that it will abort the job if the resource cannot be fetched/submitted correctly. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2918ce62e..4468def5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,7 +213,7 @@ include: FDO_DISTRIBUTION_EXEC: >- mkdir -p /opt ; cd /opt ; - curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/cxx/linux64 + curl --fail -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/cxx/linux64 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN ; tar xf /tmp/cov-analysis-linux64.tgz ; mv cov-analysis-linux64-* coverity ; @@ -621,7 +621,7 @@ build_with_coverity: --xml-option=append_arg@C:"replace/(__has_builtin|_GLIBCXX_HAS_BUILTIN)\(\w+\)/1" - cov-build --dir cov-int --config coverity_conf.xml meson compile -C "$BUILD_DIR" $COMPILE_ARGS - tar czf cov-int.tar.gz cov-int - - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME + - curl --fail-with-body https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL --form file=@cov-int.tar.gz --form version="`git describe --tags`" --form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID "