Skip to content

Commit

Permalink
Enable pgp signing
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed May 30, 2024
1 parent 69eaf6f commit 2ab61e8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
12 changes: 11 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ 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 @@ -29,8 +37,10 @@ pipeline {
sh 'cargo --version'
sh 'rustup show'
sh 'rust-gdb --version'
withCredentials([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'
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 'rust-analyzer --version'
}
Expand Down
21 changes: 12 additions & 9 deletions repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,29 +105,32 @@
</plugins>
</build>

<!--profiles>
<profiles>
<profile>
<id>packAndSign</id>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.cbi.maven.plugins</groupId>
<artifactId>eclipse-dmg-packager</artifactId>
<version>1.1.8-SNAPSHOT</version>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-gpg-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<goals><goal>package-dmg</goal></goals>
<phase>package</phase>
<id>pgpsigner</id>
<goals>
<goal>sign-p2-artifacts</goal>
</goals>
<configuration>
<source>${project.build.directory}/products/eclipseide-rust-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-macosx-cocoa-x86_64.tar.gz</source>
<keyname>19C6F458E5758349</keyname>
<skipIfJarsigned>false</skipIfJarsigned>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles-->
</profiles>

<repositories>
<repository>
Expand Down

0 comments on commit 2ab61e8

Please sign in to comment.