Skip to content

Commit c403602

Browse files
committed
prepare p2 signing
Step1: no signing (sign=false) but prepare the usage of environment variables , which might come from the GH Action workflow later. e.g. setting `P2_SIGN=true` env var enables the signing Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
1 parent dbd942c commit c403602

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

org.bndtools.p2/bnd.bnd

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,26 @@ plugins: ${map;repo;${template;pluginnames;${@};latest}}
4343

4444
-maven-release:
4545
-buildrepo:
46-
-releaserepo:
46+
-releaserepo:
47+
48+
# P2 signing:
49+
# key (name of the key),
50+
# passphrase (optional)
51+
# pubkey (read publickey file e.g. from ~./bnd/ folder)
52+
# below
53+
# The idea is to first check global variables in ~./bnd/settings.json
54+
# and fallback to environment variables.
55+
# For Github Actions you would set the environment variables.
56+
# fallback is "false" if none is set.
57+
sign=${global;p2.sign;${env;P2_SIGN;false}}
58+
key=${global;p2.sign_key;${env;P2_SIGN_KEY}}
59+
passphrase=${global;p2.sign_passphrase;${env;P2_SIGN_PASSPHRASE}}
60+
pubkey="${global;p2.pub_key;${env;P2_PUB_KEY}}"
61+
4762
-export features.bnd; \
4863
type=p2; \
49-
name=org.bndtools.p2.jar
64+
name=org.bndtools.p2.jar;\
65+
sign=${sign};\
66+
sign_key=${key};\
67+
sign_passphrase=${passphrase};\
68+
sign_pubkey=${pubkey};\

0 commit comments

Comments
 (0)