Skip to content

Commit 36826d4

Browse files
authored
Use new gpg key (A0B5CA1A4E086838) (#237)
1 parent e5f76d3 commit 36826d4

File tree

8 files changed

+25
-26
lines changed

8 files changed

+25
-26
lines changed

.ci/README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Since 7.9.0, the plugin is signed with the same GPG key, that is used to sign the main PMD artifacts
66
for maven central.
77

8-
See <https://github.com/pmd/build-tools/blob/main/scripts/files/release-signing-key-D0BF1D737C9A1C22.asc>.
8+
See <https://github.com/pmd/build-tools/blob/main/scripts/files/release-signing-key-2EFA55D0785C31F956F2F87EA0B5CA1A4E086838-public.asc>.
99

1010
Tycho's [GPG Plugin](https://tycho.eclipseprojects.io/doc/latest/tycho-gpg-plugin/sign-p2-artifacts-mojo.html)
1111
is used for that.
@@ -14,17 +14,8 @@ There is no need anymore to use jar signer and use a real Let's Encrypt certific
1414

1515
**How it works:**
1616

17-
* During build setup, `.m2/settings.xml` contains properties for signing:
18-
```xml
19-
<profile>
20-
<id>sign</id>
21-
<properties>
22-
<gpg.keyname>${env.CI_SIGN_KEYNAME}</gpg.keyname>
23-
<gpg.passphrase>${env.CI_SIGN_PASSPHRASE}</gpg.passphrase>
24-
</properties>
25-
</profile>
26-
```
27-
* These environment variables (`CI_SIGN_KEYNAME`) are set by `pmd_ci_setup_secrets_private_env`
17+
* During build setup, the private gpg key is imported from the environment variable `PMD_CI_GPG_PRIVATE_KEY`
18+
which is a secret in GitHub Action. This environment variable is used by `pmd_ci_setup_secrets_private_env`
2819
which is called by `build.sh` (but not for pull requests).
29-
30-
* The tycho gpg plugin is activated only when profile `sign` is activated.
20+
* The gpg plugin uses the environment variable `MAVEN_GPG_PASSPHRASE` for the passphrase. This is
21+
configured as well as a secret. The tycho gpg plugin is activated only when profile `sign` is activated.

.ci/build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ function snapshot_build() {
6868
pmd_ci_log_group_start "Snapshot Build: ${PMD_CI_MAVEN_PROJECT_VERSION}"
6969
pmd_ci_log_info "This is a snapshot build on branch ${PMD_CI_BRANCH} (version: ${PMD_CI_MAVEN_PROJECT_VERSION})"
7070

71-
export MAVEN_GPG_PASSPHRASE="${CI_SIGN_PASSPHRASE}"
7271
${xvfb_cmd} ./mvnw clean verify \
7372
--show-version --errors --batch-mode --no-transfer-progress \
74-
--activate-profiles sign_env -Dgpg.keyname="${CI_SIGN_KEYNAME}" \
73+
--activate-profiles sign \
7574
-Dtarget.platform=${TARGET_PLATFORM}
76-
unset MAVEN_GPG_PASSPHRASE
7775

7876
# Upload update site to sourceforge
7977
local qualifiedVersion
@@ -120,12 +118,10 @@ function release_build() {
120118
pmd_ci_log_group_start "Release Build: ${PMD_CI_MAVEN_PROJECT_VERSION}"
121119
pmd_ci_log_info "This is a release build for tag ${PMD_CI_TAG} (version: ${PMD_CI_MAVEN_PROJECT_VERSION})"
122120

123-
export MAVEN_GPG_PASSPHRASE="${CI_SIGN_PASSPHRASE}"
124121
${xvfb_cmd} ./mvnw clean verify \
125122
--show-version --errors --batch-mode --no-transfer-progress \
126-
--activate-profiles sign_env -Dgpg.keyname="${CI_SIGN_KEYNAME}" \
123+
--activate-profiles sign \
127124
-Dtarget.platform=${TARGET_PLATFORM}
128-
unset MAVEN_GPG_PASSPHRASE
129125

130126
pmd_ci_log_group_end
131127

.github/actions/build/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ inputs:
1313
githubToken:
1414
description: 'The GitHub Token used for releases'
1515
required: false
16+
pmdCiGpgPrivateKey:
17+
description: 'The GPG Private Key used for signing the release'
18+
required: false
19+
pmdCiGpgPassphrase:
20+
description: 'The passphrase for the GPG private key used for signing the release'
21+
required: false
1622

1723
runs:
1824
using: 'composite'
@@ -25,3 +31,5 @@ runs:
2531
DEPLOY: ${{ inputs.deploy }}
2632
PMD_CI_SECRET_PASSPHRASE: ${{ inputs.pmdCiSecretPassphrase }}
2733
GITHUB_TOKEN: ${{ inputs.githubToken }}
34+
PMD_CI_GPG_PRIVATE_KEY: ${{ inputs.pmdCiGpgPrivateKey }}
35+
MAVEN_GPG_PASSPHRASE: ${{ inputs.pmdCiGpgPassphrase }}

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runs:
2929
run: |
3030
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
3131
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3" >> $GITHUB_ENV
32-
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/28/scripts" >> $GITHUB_ENV
32+
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/main/scripts" >> $GITHUB_ENV
3333
- name: Check Environment
3434
shell: bash
3535
run: |

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
deploy: true
3333
pmdCiSecretPassphrase: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
3434
githubToken: ${{ secrets.GITHUB_TOKEN }}
35+
pmdCiGpgPrivateKey: ${{ secrets.PMD_CI_GPG_PRIVATE_KEY }}
36+
pmdCiGpgPassphrase: ${{ secrets.PMD_CI_GPG_PASSPHRASE }}
3537

3638
- name: Upload screenshots of failed unit tests
3739
uses: actions/upload-artifact@v4
@@ -79,8 +81,6 @@ jobs:
7981
with:
8082
targetPlatform: ${{ matrix.targetPlatform }}
8183
deploy: false
82-
pmdCiSecretPassphrase: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
83-
githubToken: ${{ secrets.GITHUB_TOKEN }}
8484

8585
- name: Upload screenshots of failed unit tests
8686
uses: actions/upload-artifact@v4

ReleaseNotes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ Eclipse Update Site:
1212
This is a minor release.
1313

1414
### New and noteworthy
15+
* The plugin uses a new GPG key for code signing. Releases are signed with
16+
[A0B5CA1A4E086838](https://keyserver.ubuntu.com/pks/lookup?search=0x2EFA55D0785C31F956F2F87EA0B5CA1A4E086838&fingerprint=on&op=index).
17+
The full fingerprint is `2EFA 55D0 785C 31F9 56F2 F87E A0B5 CA1A 4E08 6838`.
1518

1619
### Fixed Issues
1720

1821
### API Changes
1922

20-
### External Contributions
23+
### Merged pull requests
24+
* Use new gpg key ([#237](https://github.com/pmd/pmd-eclipse-plugin/pull/237)) by [@adangel](https://github.com/adangel)
2125

2226
## 27-December-2024: 7.9.0.v20241227-1626-r
2327

net.sourceforge.pmd.eclipse.p2updatesite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<profiles>
4141
<profile>
42-
<id>sign_env</id>
42+
<id>sign</id>
4343
<build>
4444
<plugins>
4545
<plugin>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<tycho.version>4.0.10</tycho.version>
2323
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2424
<pmd.version>7.9.0</pmd.version>
25-
<pmd.build-tools.version>28</pmd.build-tools.version>
25+
<pmd.build-tools.version>29-SNAPSHOT</pmd.build-tools.version>
2626
<checkstyle.version>10.18.1</checkstyle.version>
2727
<checkstyle.plugin.version>3.5.0</checkstyle.plugin.version>
2828
<pmd.plugin.version>3.25.0</pmd.plugin.version>

0 commit comments

Comments
 (0)