From fcef821b6be679f65f6adb6fe955e4b836b72fe4 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Tue, 15 Sep 2020 14:09:00 +0200 Subject: [PATCH] checkupdates-trigger: use a working parallels version GNU parallels in Debian is 4 years out of date, missing about 40 releases and not updated in sid either. The version in Debian claims to support the -X option for splitting arguments in $jobs buckets but generates completely bogus jobs, where the first job contains something like 80% of all arguments and the other jobs contain much less. It also generates 11 jobs when we asked for 10... :-/. Also simplify the setup further by using parallel's {/.} replacement pattern, which strips leading path's and extensions instead of bash pattern substitution magic. --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff6beaf4d3..27cbbc3767 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,15 +76,11 @@ checkupdates_trigger: - schedules variables: - $CHECKUPDATES == "true" - image: debian:buster-slim + image: archlinux:latest before_script: - - apt-get update - - apt-get install -qy --no-install-recommends parallel curl ca-certificates + - pacman -Sy --noconfirm parallel script: - - files=( metadata/*.yml ) - - files=( ${files[@]#metadata/} ) - - files=( ${files[@]%.yml} ) - - parallel --verbose --delay 90 -X --jobs 10 'curl -X POST -F "token=$CI_JOB_TOKEN" -F "ref=master" -F "variables[CHECKUPDATES]=true" -F "variables[CHECKUPDATES_APPIDS]= {} " https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/trigger/pipeline' ":::" ${files[@]} + - parallel --verbose --delay 90 -X --jobs 10 'curl -X POST -F "token=$CI_JOB_TOKEN" -F "ref=master" -F "variables[CHECKUPDATES]=true" -F "variables[CHECKUPDATES_APPIDS]= {/.} " https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/trigger/pipeline' ":::" metadata/*.yml checkupdates_runner: image: registry.gitlab.com/fdroid/ci-images-checkupdates:latest