Skip to content

Commit d8e88f7

Browse files
fix: import GPG signing key for Maven signing in ci-build
The maven-gpg-plugin signs via the local gpg keyring, but secring.gpg was downloaded and copied without ever being imported, leaving the keyring empty on the fresh build agent. Add a gpg --import step so the signing key is available, and remove the unused \ variable left over from the Gradle build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4667f49 commit d8e88f7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.azure-pipelines/ci-build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,15 @@ extends:
6060
Copy-Item $(downloadLocalProperties.secureFilePath) local.properties -Verbose
6161
displayName: Copy secring and 'local.properties'
6262
63+
- pwsh: |
64+
# maven-gpg-plugin signs via the local gpg keyring, so the key from
65+
# secring.gpg must be imported into gpg before signing can succeed.
66+
gpg --batch --import secring.gpg
67+
displayName: Import GPG signing key
68+
6369
- pwsh: |
6470
$props = Get-Content local.properties -Raw
6571
$keyId = ($props | Select-String -Pattern 'signing\.keyId=(.+)').Matches.Groups[1].Value
66-
$keyRingFile = ($props | Select-String -Pattern 'signing\.secretKeyRingFile=(.+)').Matches.Groups[1].Value
6772
$keyPassword = ($props | Select-String -Pattern 'signing\.password=(.+)').Matches.Groups[1].Value
6873
6974
$settingsXml = @"

0 commit comments

Comments
 (0)