Skip to content

Commit

Permalink
[ci] Handle gpg passphrase as env var
Browse files Browse the repository at this point in the history
  • Loading branch information
adangel committed Dec 21, 2024
1 parent cbe4deb commit 5577452
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ function snapshot_build() {
pmd_ci_log_group_start "Snapshot Build: ${PMD_CI_MAVEN_PROJECT_VERSION}"
pmd_ci_log_info "This is a snapshot build on branch ${PMD_CI_BRANCH} (version: ${PMD_CI_MAVEN_PROJECT_VERSION})"

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

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

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

pmd_ci_log_group_end

Expand Down
2 changes: 1 addition & 1 deletion net.sourceforge.pmd.eclipse.p2updatesite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<profiles>
<profile>
<id>sign</id>
<id>sign_env</id>
<build>
<plugins>
<plugin>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
<version>${tycho.version}</version>
<configuration>
<bestPractices>true</bestPractices>
<useAgent>false</useAgent>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 5577452

Please sign in to comment.