Testing signing artifacts
[releng.git] / utils / test-sign-artifact.sh
1 #!/bin/bash
2
3 # clone releng repository
4 echo "Cloning releng repository..."
5 [ -d releng ] && rm -rf releng
6 git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
7 #this is where we import the siging key
8 if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then 
9   source $WORKSPACE/releng/utils/gpg_import_key.sh
10 fi
11
12 artifact="foo"
13 echo foo > foo
14
15 testsign () {
16   echo "Signing artifact: ${artifact}"
17   gpg2 -vvv --batch \
18     --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
19     --passphrase besteffort \
20     --detach-sig $artifact
21 done
22 }
23
24 testsign
25