Commit f6c256e5 by Johannes Edmeier

Decrypt secrets only when passphrase is present

In cas a pull request is tested, the secret environment variables are not present, because they could be exposed by a malicious pull request. So we can only decrypt the gpg-keys only when the keyphrase is availible.
parent f4b2c380
......@@ -2,10 +2,10 @@ language: java
sudo: false
before_install:
- openssl aes-256-cbc -d -pass "env:DECRYPT_KEYPHRASE" -in .gnupg.tar.enc | tar xv
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "if [[ ${TRAVIS_TAG} != '' ]]; then mvn versions:set -DnewVersion='${TRAVIS_TAG}'; fi"
- 'if [[ -n "$DECRYPT_KEYPHRASE" ]]; then openssl aes-256-cbc -d -pass "env:DECRYPT_KEYPHRASE" -in .gnupg.tar.enc | tar xv; fi'
- 'if [[ ${TRAVIS_TAG} != "" ]]; then mvn versions:set -DnewVersion="${TRAVIS_TAG}"; fi'
script: mvn clean verify
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment