Skip to content

Commit 6892958

Browse files
committed
Fix gpg signing
1 parent 77de7d8 commit 6892958

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

Jenkinsfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,12 @@ spec:
5555
MAVEN_OPTS = "-Xmx2G"
5656
}
5757
stages {
58-
stage('Initialize PGP') {
59-
steps {
60-
container('container') {
61-
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
62-
sh 'gpg --batch --import "${KEYRING}"'
63-
sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
64-
}}
65-
}
66-
}
6758
stage('Build') {
6859
steps {
6960
container('container') {
70-
withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
61+
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'),string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE') ]) {
7162
wrap([$class: 'Xvnc', useXauthority: true]) {
72-
sh """mvn clean verify -e ${env.BRANCH_NAME=='master' ? '-Psign': ''} -Dmaven.test.failure.ignore=true -ntp -Ddash.fail=true -Dgpg.passphrase="${KEYRING_PASSPHRASE}" """
63+
sh '''mvn -e -Psign -Dmaven.test.failure.ignore=true -ntp -Ddash.fail=true -Dgpg.passphrase="${KEYRING_PASSPHRASE}" -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" clean verify'''
7364
}
7465
}}
7566
}

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@
269269
<goal>sign-p2-artifacts</goal>
270270
</goals>
271271
<configuration>
272-
<keyname>F5CBCFD82F07D82E</keyname>
273-
<skipIfJarsigned>false</skipIfJarsigned>
272+
<signer>bc</signer>
273+
<keyname>2F07D82E</keyname>
274+
<skipIfJarsigned>true</skipIfJarsigned>
274275
</configuration>
275276
</execution>
276277
</executions>

releng/org.eclipse.linuxtools.docker-site/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,6 @@
6363
<plugin>
6464
<groupId>org.eclipse.tycho</groupId>
6565
<artifactId>tycho-gpg-plugin</artifactId>
66-
<executions>
67-
<execution>
68-
<id>pgpsigner</id>
69-
<goals>
70-
<goal>sign-p2-artifacts</goal>
71-
</goals>
72-
<configuration>
73-
<keyname>F5CBCFD82F07D82E</keyname>
74-
<skipIfJarsigned>false</skipIfJarsigned>
75-
</configuration>
76-
</execution>
77-
</executions>
7866
</plugin>
7967
</plugins>
8068
</build>

0 commit comments

Comments
 (0)