summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2025-01-04 18:07:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2025-01-04 18:07:23 -0300
commitb0bf21b02ec2cd08881562d6abbd0fbed1e40539 (patch)
tree6c9948eaaaf87cac3599948756fcb9e97cb8397f
parent5084a7305ec2684e8b8957da888788be99b3efeb (diff)
downloadkeyringer-b0bf21b02ec2cd08881562d6abbd0fbed1e40539.tar.gz
keyringer-b0bf21b02ec2cd08881562d6abbd0fbed1e40539.tar.bz2
Fix: CI: test: recipient creation procedure (#10)
-rw-r--r--.gitlab-ci.yml8
1 files changed, 7 insertions, 1 deletions
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); 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); 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