From 7704e1c4b45499095d855979b766653ce0e53ffc Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Thu, 23 Feb 2023 13:01:42 +0100 Subject: [PATCH] Introduced ABUILD_FLAGS variable and fixed CI --- .build.yml | 4 ++-- .woodpecker.yml | 7 ++++--- build.sh | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.build.yml b/.build.yml index cc82fa2..df4967b 100644 --- a/.build.yml +++ b/.build.yml @@ -16,10 +16,10 @@ secrets: - cb16ed57-2486-4afc-be50-8bbcd3fae405 # aports pubkey - f0aa24db-26a9-4b3d-b379-eee7429fd6f6 -artifacts: - - ./packages tasks: - setup: echo 'PACKAGER_PRIVKEY=$HOME/.abuild/comcloudway@ccw.icu.rsa' >> $HOME/.abuild/abuild.conf - build: | cd ccw-aports ./build.sh repo main + - package: | + # TODO: Add task to upload artifacts in current repo diff --git a/.woodpecker.yml b/.woodpecker.yml index 7310e62..c75c392 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,11 +3,12 @@ pipeline: build: image: alpine:edge commands: - - echo "$whoami" - apk update - apk add fd bash abuild dateutils - mkdir -p $HOME/.abuild - - echo '$PACKAGE_SIGNATURE' > $PWD/comcloudway@ccw.icu.rsa - - echo 'PACKAGER_PRIVKEY=$PWD/comcloudway@ccw.icu.rsa' >> $HOME/.abuild/abuild.conf + - echo "$PACKAGE_SIGNATURE" > $CI_WORKSPACE/comcloudway@ccw.icu.rsa + - echo "PACKAGER_PRIVKEY=$CI_WORKSPACE/comcloudway@ccw.icu.rsa" >> /root/.abuild/abuild.conf + - cp "$CI_WORKSPACE/comcloudway@ccw.icu.rsa.pub" /etc/apk/keys/ + - export ABUILD_FLAGS="$ABUILD_FLAGS -F" - ./build.sh all secrets: [ package_signature ] diff --git a/build.sh b/build.sh index 97b7e50..8b7e65a 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,8 @@ #!/bin/sh # Needs: fd, bash, abuild, dateutils +export ABUILD_FLAGS="$ABUILD_FLAGS" + set -eu -o pipefail # Build a specific package @@ -13,7 +15,7 @@ function build_package() { echo ">>> Building $pkg from $repo" cd $repo/$pkg - abuild -r + abuild -r $ABUILD_FLAGS cd ../.. end="$( date | awk -F ' ' '{ print $4 }' )" -- 2.38.5