Skip to content

Commit 5577452

Browse files
committed
[ci] Handle gpg passphrase as env var
1 parent cbe4deb commit 5577452

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.ci/build.sh

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

70+
export MAVEN_GPG_PASSPHRASE="${CI_SIGN_PASSPHRASE}"
7071
${xvfb_cmd} ./mvnw clean verify \
7172
--show-version --errors --batch-mode --no-transfer-progress \
72-
--activate-profiles sign \
73+
--activate-profiles sign_env \
7374
-Dtarget.platform=${TARGET_PLATFORM}
75+
unset MAVEN_GPG_PASSPHRASE
7476

7577
# Upload update site to sourceforge
7678
local qualifiedVersion
@@ -117,10 +119,12 @@ function release_build() {
117119
pmd_ci_log_group_start "Release Build: ${PMD_CI_MAVEN_PROJECT_VERSION}"
118120
pmd_ci_log_info "This is a release build for tag ${PMD_CI_TAG} (version: ${PMD_CI_MAVEN_PROJECT_VERSION})"
119121

122+
export MAVEN_GPG_PASSPHRASE="${CI_SIGN_PASSPHRASE}"
120123
${xvfb_cmd} ./mvnw clean verify \
121124
--show-version --errors --batch-mode --no-transfer-progress \
122-
--activate-profiles sign \
125+
--activate-profiles sign_env \
123126
-Dtarget.platform=${TARGET_PLATFORM}
127+
unset MAVEN_GPG_PASSPHRASE
124128

125129
pmd_ci_log_group_end
126130

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</id>
42+
<id>sign_env</id>
4343
<build>
4444
<plugins>
4545
<plugin>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@
338338
<version>${tycho.version}</version>
339339
<configuration>
340340
<bestPractices>true</bestPractices>
341+
<useAgent>false</useAgent>
341342
</configuration>
342343
</plugin>
343344
<plugin>

0 commit comments

Comments
 (0)