From b0bf21b02ec2cd08881562d6abbd0fbed1e40539 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 4 Jan 2025 18:07:23 -0300 Subject: Fix: CI: test: recipient creation procedure (#10) --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a27e8b..11e580b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,7 +78,13 @@ test: - git config --global user.name 'Test' - git config --global user.email 'test@example.org' - ./keyringer test init ~/temp/tests/keyringer - - gpg --with-colons --list-keys | grep "^uid" | awk -F ':' '{ x = $10; gsub(/.*/, "", x); print x, $8; }' >> ~/temp/tests/keyringer/config/recipients/default + + # Build the recipients configuration + # Explanation on the "paste" syntax is available at https://stackoverflow.com/a/9605450 + - gpg --with-colons --list-keys | grep "^uid" | head -1 | awk -F ':' '{ x = $10; gsub(/.*/, "", x); print x; }' > ~/temp/tests/recipients + - gpg --with-colons --list-public-keys --with-fingerprint | grep "^fpr" | head -1 | awk -F ':' '{ print $10 }' >> ~/temp/tests/recipients + - paste -d " " - - < ~/temp/tests/recipients > ~/temp/tests/keyringer/config/recipients/default + - rm ~/temp/tests/recipients - ./keyringer test recipients ls # Test the keyring in the develop branch -- cgit v1.2.3