From 99784874ebba4bc75b5979f8f08cef4ed523a3d8 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 16 Jun 2022 11:41:04 +0200 Subject: [PATCH] chore(ci): small refactor. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Federico Di Pierro Co-authored-by: Vicente J. Jiménez Miras --- .circleci/config.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b1c2e7a..26b60baf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -221,10 +221,6 @@ jobs: echo "%_signature gpg" > ~/.rpmmacros echo "%_gpg_name Falcosecurity Package Signing" >> ~/.rpmmacros echo "%__gpg_sign_cmd %{__gpg} --force-v3-sigs --batch --no-armor --passphrase-fd 3 --no-secmem-warning -u \"%{_gpg_name}\" -sb --digest-algo sha256 %{__plaintext_filename}'" >> ~/.rpmmacros - - run: - name: Sign rpm x86_64 - command: | - cd /build/release/ echo '#!/usr/bin/expect -f' > sign echo 'spawn rpmsign --addsign {*}$argv' >> sign echo 'expect -exact "Enter pass phrase: "' >> sign @@ -232,20 +228,17 @@ jobs: echo 'expect eof' >> sign chmod +x sign echo $GPG_KEY | base64 -d | gpg --import - ./sign *.rpm + - run: + name: Sign rpm x86_64 + command: | + cd /build/release/ + ~/sign *.rpm test "$(rpm -qpi *.rpm | awk '/Signature/' | grep -i none | wc -l)" -eq 0 - run: name: Sign rpm arm64 command: | cd /build-arm64/release/ - echo '#!/usr/bin/expect -f' > sign - echo 'spawn rpmsign --addsign {*}$argv' >> sign - echo 'expect -exact "Enter pass phrase: "' >> sign - echo 'send -- "\n"' >> sign - echo 'expect eof' >> sign - chmod +x sign - echo $GPG_KEY | base64 -d | gpg --import - ./sign *.rpm + ~/sign *.rpm test "$(rpm -qpi *.rpm | awk '/Signature/' | grep -i none | wc -l)" -eq 0 - persist_to_workspace: root: /