From e46b372cda9d5c3a78f66e6a1eb54972cc13c55e Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Thu, 22 Feb 2024 21:55:51 +0100 Subject: [PATCH 1/6] Disable unnecessary jobs for current issue --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29c34a4e..d86634bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ image: debian:buster before_script: - uname -a -pngcheck: +.pngcheck: stage: test script: - ./.tools/pngcheck.sh @@ -17,7 +17,7 @@ imagemagiccheck: - ./.tools/imagemagiccheck.sh allow_failure: true -manaplus: +.manaplus: stage: test script: - ./.tools/manaplus.sh @@ -29,7 +29,7 @@ manaplus: expire_in: 3 week allow_failure: true -newlines: +.newlines: stage: test tags: - lightweight @@ -42,7 +42,7 @@ newlines: expire_in: 3 week #allow_failure: true -licensecheck: +.licensecheck: stage: test tags: - lightweight @@ -51,7 +51,7 @@ licensecheck: - ./.tools/licensecheck.sh allow_failure: true -testxml: +.testxml: stage: test image: ubuntu:18.04 tags: From 140bc02a4a9a8ef2e32629a41598233059980995 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Thu, 22 Feb 2024 22:13:21 +0100 Subject: [PATCH 2/6] Whats $CI_BUILD_REPO nowadays? --- .tools/init.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.tools/init.sh b/.tools/init.sh index 4fe533ef..57109b63 100755 --- a/.tools/init.sh +++ b/.tools/init.sh @@ -19,6 +19,7 @@ function gitclone1 { } function gitclone { + printf '$CI_BUILD_REPO is $s\n' "$CI_BUILD_REPO" export name1=$1/$2 export name2=${CI_BUILD_REPO##*@} export name2=https://${name2%/*}/$2 From 363c80c7214a68330ba933dce3856ac24de2913d Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Thu, 22 Feb 2024 22:20:15 +0100 Subject: [PATCH 3/6] There's a typo invasion --- .tools/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tools/init.sh b/.tools/init.sh index 57109b63..d02395d1 100755 --- a/.tools/init.sh +++ b/.tools/init.sh @@ -19,7 +19,7 @@ function gitclone1 { } function gitclone { - printf '$CI_BUILD_REPO is $s\n' "$CI_BUILD_REPO" + printf '$CI_BUILD_REPO is %s\n' "$CI_BUILD_REPO" export name1=$1/$2 export name2=${CI_BUILD_REPO##*@} export name2=https://${name2%/*}/$2 From b11d6990b7dd1049cc76e5ae26c8d918295af379 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Thu, 22 Feb 2024 23:33:56 +0100 Subject: [PATCH 4/6] Let's see about testxml job --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d86634bd..a49aed0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ before_script: - ./.tools/pngcheck.sh #allow_failure: true -imagemagiccheck: +.imagemagiccheck: stage: test script: - ./.tools/imagemagiccheck.sh @@ -51,7 +51,7 @@ imagemagiccheck: - ./.tools/licensecheck.sh allow_failure: true -.testxml: +testxml: stage: test image: ubuntu:18.04 tags: From 1bf65ed6b8a7ff99cd29d88e69070654f7543896 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Fri, 23 Feb 2024 00:55:19 +0100 Subject: [PATCH 5/6] Fix the single line error spam --- .tools/testxml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tools/testxml.sh b/.tools/testxml.sh index a0dc16b3..9982554b 100755 --- a/.tools/testxml.sh +++ b/.tools/testxml.sh @@ -16,7 +16,7 @@ check_error $? export RES=$(cat errors.txt) if [[ -n "${RES}" ]]; then echo "xml check failed" >../../../clientdata/shared/error.log - echo ${RES} >>../../../clientdata/shared/error.log + cat errors.txt >>../../../clientdata/shared/error.log cat ../../../clientdata/shared/error.log exit 1 fi From 4640bbf457201ad377ed4c5515a85a13cbd00eee Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Tue, 8 Oct 2024 17:20:16 +0200 Subject: [PATCH 6/6] Replace nonexisting $CI_BUILD_REPO with $CI_REPOSITORY_URL --- .tools/init.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.tools/init.sh b/.tools/init.sh index d02395d1..7a0d3eb1 100755 --- a/.tools/init.sh +++ b/.tools/init.sh @@ -18,11 +18,18 @@ function gitclone1 { return $? } +# First try cloning $2 into $3 from this repository's +# project space, then use provided fallback space ($1). function gitclone { printf '$CI_BUILD_REPO is %s\n' "$CI_BUILD_REPO" - export name1=$1/$2 - export name2=${CI_BUILD_REPO##*@} - export name2=https://${name2%/*}/$2 + printf '$CI_REPOSITORY_URL is %s\n' "$CI_REPOSITORY_URL" + printf '$CI_PROJECT_URL is %s\n' "$CI_PROJECT_URL" + local name1=$1/$2 + # Format https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.example.com/my-group/my-project.git + # strip token part + local name2=${CI_REPOSITORY_URL##*@} + # Strip URL down to namespace and append the project we want + local name2=https://${name2%/*}/$2 gitclone1 "$name1" "$name2" $3 if [ "$?" != 0 ]; then