From 0d610fe4ce343c3bfcd21d1ab41cabaf7a27b2cd Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 10 Feb 2023 05:37:40 +0000 Subject: [PATCH 1/2] gitlab-ci: initial v3.16 --- .gitlab-ci.yml | 8 ++++---- .gitlab/bin/build.sh | 6 +++--- .gitlab/bin/push.sh | 4 ++-- user/py3-iso639/APKBUILD | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00b93d4..92c7743 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ lint: only: - merge_requests tags: - - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME + - apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME build: stage: build @@ -40,7 +40,7 @@ build: only: - merge_requests tags: - - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME + - apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME push: interruptible: true @@ -50,11 +50,11 @@ push: artifacts: true script: - | - sudo apk add git abuild + sudo apk add abuild git-lfs export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin" push.sh rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: manual tags: - - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME + - apk-$CI_MERGE_REQUEST_TARGET_BRANCH_NAME diff --git a/.gitlab/bin/build.sh b/.gitlab/bin/build.sh index c408171..48885cd 100755 --- a/.gitlab/bin/build.sh +++ b/.gitlab/bin/build.sh @@ -7,7 +7,7 @@ set -eu -o pipefail readonly APORTSDIR=$CI_PROJECT_DIR -readonly REPOS="cross backports user" +readonly REPOS="backports user" readonly ALPINE_REPOS="main community testing" readonly ARCH=$(apk --print-arch) # gitlab variables @@ -70,8 +70,8 @@ report() { get_release() { case $BASEBRANCH in - v*) echo v"${BASEBRANCH%-*}";; - master) echo edge;; + v*) echo "${BASEBRANCH%-*}";; + edge) echo edge;; *) die "Branch \"$BASEBRANCH\" not supported!" esac } diff --git a/.gitlab/bin/push.sh b/.gitlab/bin/push.sh index 0c93e93..d698f24 100755 --- a/.gitlab/bin/push.sh +++ b/.gitlab/bin/push.sh @@ -8,7 +8,7 @@ set -eu -o pipefail readonly APORTSDIR=$CI_PROJECT_DIR -readonly REPOS="cross backports user" +readonly REPOS="backports user" readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" @@ -23,7 +23,7 @@ echo "PACKAGER_PRIVKEY=$HOME/.abuild/key.rsa" >> $HOME/.abuild/abuild.conf echo "REPODEST=$CI_PROJECT_DIR/repo-apk" >> $HOME/.abuild/abuild.conf doas cp $HOME/.abuild/key.rsa.pub /etc/apk/keys/. -git clone git@lab.ilot.io:ayakael/repo-apk -b $CI_MERGE_REQUEST_PROJECT_URL +git clone git@lab.ilot.io:ayakael/repo-apk -b $BASEBRANCH for i in $(find packages -type f -name "*.apk"); do cp $i ${i/packages/repo-apk} done diff --git a/user/py3-iso639/APKBUILD b/user/py3-iso639/APKBUILD index 7f18a40..6ce8504 100644 --- a/user/py3-iso639/APKBUILD +++ b/user/py3-iso639/APKBUILD @@ -4,7 +4,7 @@ pkgname=py3-iso639 _pkgname=iso639 pkgver=0.4.5 -pkgrel=0 +pkgrel=1 pkgdesc="Python library for ISO 639 standard" arch='noarch' url="https://github.com/noumar/iso639" From 74b109f338b5abb0cb0747c9e33e487e71460419 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 21 Feb 2023 22:04:09 -0500 Subject: [PATCH 2/2] gitlab-ci: fix APKINDEX signing on push --- .gitlab/bin/push.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab/bin/push.sh b/.gitlab/bin/push.sh index d698f24..6738bd1 100755 --- a/.gitlab/bin/push.sh +++ b/.gitlab/bin/push.sh @@ -13,15 +13,15 @@ readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -gitlab_key_to_rsa $ABUILD_KEY PRIVATE $HOME/.abuild/key.rsa -gitlab_key_to_rsa $ABUILD_KEY_PUB PUBLIC $HOME/.abuild/key.rsa.pub +gitlab_key_to_rsa $ABUILD_KEY PRIVATE $HOME/.abuild/$ABUILD_KEY_NAME.rsa +gitlab_key_to_rsa $ABUILD_KEY_PUB PUBLIC $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub gitlab_key_to_rsa $SSH_KEY PRIVATE $HOME/.ssh/id_rsa chmod 700 "$HOME"/.ssh/id_rsa -chmod 700 "$HOME"/.abuild/key.rsa +chmod 700 "$HOME"/.abuild/$ABUILD_KEY_NAME.rsa -echo "PACKAGER_PRIVKEY=$HOME/.abuild/key.rsa" >> $HOME/.abuild/abuild.conf +echo "PACKAGER_PRIVKEY=$HOME/.abuild/$ABUILD_KEY_NAME.rsa" >> $HOME/.abuild/abuild.conf echo "REPODEST=$CI_PROJECT_DIR/repo-apk" >> $HOME/.abuild/abuild.conf -doas cp $HOME/.abuild/key.rsa.pub /etc/apk/keys/. +doas cp $HOME/.abuild/$ABUILD_KEY_NAME.rsa.pub /etc/apk/keys/. git clone git@lab.ilot.io:ayakael/repo-apk -b $BASEBRANCH for i in $(find packages -type f -name "*.apk"); do