summaryrefslogtreecommitdiffstats
path: root/utils/test-sign-artifact.sh
blob: f92474aabae9cced180fdbb2ce77de5b1ad0312a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

export PATH=$PATH:/usr/local/bin/

# clone releng repository
echo "Cloning releng repository..."
[ -d releng ] && rm -rf releng
git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
#this is where we import the siging key
if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then 
  source $WORKSPACE/releng/utils/gpg_import_key.sh
fi

artifact="foo"
echo foo > foo

testsign () {
  echo "Signing artifact: ${artifact}"
  gpg2 -vvv --batch \
    --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
    --passphrase besteffort \
    --detach-sig $artifact
done
}

testsign