Skip to content

Commit

Permalink
Option to enable GPG signing only during install/deploy (#39)
Browse files Browse the repository at this point in the history
rshivane authored Dec 24, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent fc54b4a commit da6dfde
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -50,7 +50,6 @@ before_install:
openssl aes-256-cbc -K $encrypted_60ba2f79b530_key -iv $encrypted_60ba2f79b530_iv -in conf/signingkey.asc.enc -out conf/signingkey.asc -d;
gpg2 --batch --keyring=$TRAVIS_BUILD_DIR/pubring.gpg --no-default-keyring --import conf/signingkey.asc;
gpg2 --batch --allow-secret-key-import --keyring=$TRAVIS_BUILD_DIR/secring.gpg --no-default-keyring --import conf/signingkey.asc;
gpg2 --version
fi
install:
@@ -69,7 +68,8 @@ before_script:
- echo $TRAVIS_TAG
- echo $PACKAGE_VERSION
- echo $IS_PRIMARY_MATRIX_JOB
- export COMMON_MVN_FLAGS="-Dgpg.executable=gpg2 -Dgpg.keyname=8A6106B5 -Dgpg.passphrase=$GPG_PASSPHRASE
- export COMMON_MVN_FLAGS="-s conf/maven-settings.xml
-Dgpg.executable=gpg2 -Dgpg.keyname=8A6106B5 -Dgpg.passphrase=$GPG_PASSPHRASE
-Dgpg.publicKeyring=$TRAVIS_BUILD_DIR/pubring.gpg -Dgpg.secretKeyring=$TRAVIS_BUILD_DIR/secring.gpg
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN"

@@ -90,7 +90,7 @@ after_success:
deploy:
- provider: script
script: mvn -s conf/maven-settings.xml deploy -DskipTests -B $COMMON_MVN_FLAGS
script: mvn deploy -DskipTests -B -Dskip.signing=false $COMMON_MVN_FLAGS
-Dsonar.projectKey=${SONAR_PROJECT} -Dsonar.login=${SONAR_TOKEN}
skip_cleanup: true
on:
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -59,7 +59,9 @@ limitations under the License.
</distributionManagement>

<properties>
<revision>0.9.6</revision>
<revision>1.0-SNAPSHOT</revision>
<skip.signing>true</skip.signing>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
@@ -350,6 +352,7 @@ limitations under the License.
<goal>sign</goal>
</goals>
<configuration>
<skip>${skip.signing}</skip>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>

0 comments on commit da6dfde

Please sign in to comment.