Skip to content

Commit

Permalink
PGP sign with bouncycastle
Browse files Browse the repository at this point in the history
To simplify jenkins config
  • Loading branch information
akurtakov committed Sep 11, 2024
1 parent d52d087 commit 939d1f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ pipeline {
jdk 'temurin-jdk21-latest'
}
stages {
stage('Initialize PGP') {
steps {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
sh 'gpg --batch --import "${KEYRING}"'
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'
}
}
}
stage('Prepare') {
steps {
sh 'org.eclipse.corrosion/scripts/rustup-init.sh -y'
Expand All @@ -37,9 +29,9 @@ pipeline {
sh 'cargo --version'
sh 'rustup show'
sh 'rust-gdb --version'
withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING'), string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
wrap([$class: 'Xvnc', useXauthority: true]) {
sh './mvnw -Dmaven.repo.local=$WORKSPACE/.m2 clean verify -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -Dtycho.showEclipseLog=true -Psign -Dsurefire.timeout=1800 -Dgpg.passphrase="${KEYRING_PASSPHRASE}"'
sh './mvnw -Dmaven.repo.local=$WORKSPACE/.m2 clean verify -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -Dtycho.showEclipseLog=true -Psign -Dsurefire.timeout=1800 -Dtycho.pgp.signer.bc.secretKeys="${KEYRING}" -Dgpg.passphrase="${KEYRING_PASSPHRASE}"'
}
}
sh 'rust-analyzer --version'
Expand Down
1 change: 1 addition & 0 deletions repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<goal>sign-p2-artifacts</goal>
</goals>
<configuration>
<signer>bc</signer>
<keyname>19C6F458E5758349</keyname>
<skipIfJarsigned>false</skipIfJarsigned>
</configuration>
Expand Down

0 comments on commit 939d1f1

Please sign in to comment.