summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rwxr-xr-xkeyringer10
2 files changed, 7 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4967378..2881afb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -73,7 +73,7 @@ test:
- mkdir -p ~/temp/tests
- git config --global user.name 'Test'
- git config --global user.email 'test@example.org'
- - ./keyringer test init ~/temp/tests/keyringer
+ - KEYRINGER_NON_INTERACTIVE=1 ./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
- ./keyringer test check
- ./keyringer test teardown -y
diff --git a/keyringer b/keyringer
index 938216b..75d704f 100755
--- a/keyringer
+++ b/keyringer
@@ -112,10 +112,12 @@ function keyringer_init {
fi
# Edit default recipients
- echo "Now you have to edit the default recipient configuration to be able to encrypt secrets."
- echo "Press any key to proceed editing..."
- read key
- keyringer_exec recipients "$BASEDIR" edit default
+ if [ "$KEYRINGER_NON_INTERACTIVE" != "1" ]; then
+ echo "Now you have to edit the default recipient configuration to be able to encrypt secrets."
+ echo "Press any key to proceed editing..."
+ read key
+ keyringer_exec recipients "$BASEDIR" edit default
+ fi
# Stage and commit
keyringer_exec git "$BASEDIR" add .