Skip to content

Commit

Permalink
[Build] Use the only GPG-key by default when signing Maven artifacts
Browse files Browse the repository at this point in the history
This avoids the need to specify and maintain the id of the key to use.
Because the keyring only includes one key, there is no need to specify
that one explicitly as it's then the first one and therefore chosen by
default.
  • Loading branch information
HannesWell committed Jan 6, 2025
1 parent aff36b0 commit 4d6c9b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
13 changes: 1 addition & 12 deletions JenkinsJobs/Releng/publishToMaven.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,6 @@ pipeline {
echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust
done

if [ ${PROJECT} == platform ]; then
GPG_KEY_ID=CC641282
elif [ ${PROJECT} == pde ]; then
GPG_KEY_ID=86085154
elif [ ${PROJECT} == jdt ]; then
GPG_KEY_ID=B414F87E
else
echo "Unexpected project: '$PROJECT'"
exit 1
fi

# Copy configuration pom into clean directory to stop maven from finding the .mvn folder of this git-repository
cp "${WORKSPACE}/git-repo/eclipse-platform-parent/pom.xml" eclipse-parent-pom.xml

Expand Down Expand Up @@ -160,7 +149,7 @@ pipeline {
set -x

mvn -f eclipse-parent-pom.xml -s ${SETTINGS} \\
gpg:sign-and-deploy-file -Dgpg.key.id=${GPG_KEY_ID} \\
gpg:sign-and-deploy-file -DretryFailedDeploymentCount=5 \\
-Durl=${URL} -DrepositoryId=${REPO_ID} \\
-DpomFile=${pomFile} -Dfile=${file} \\
${SOURCES_ARG} ${JAVADOC_ARG}
Expand Down
7 changes: 0 additions & 7 deletions eclipse-platform-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -714,13 +714,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<configuration>
<gpgArguments>
<arg>--default-key</arg>
<arg>${gpg.key.id}</arg>
</gpgArguments>
<retryFailedDeploymentCount>5</retryFailedDeploymentCount>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down

0 comments on commit 4d6c9b3

Please sign in to comment.