[ci] Not setting up gpg under Windows

Importing the release signing key will start the gpg-agent.
This background task then prevents travis-ci from terminating
the build job under Windows.

Since gpg is not needed for building PMD under Windows, I simply
don't import the keys.
Alternatively, running "gpgconf --kill gpg-agent" should also
work.
This commit is contained in:
Andreas Dangel
2019-11-28 19:47:33 +01:00
parent 8a6f426fb7
commit f7778d06b5

View File

@ -18,8 +18,17 @@ mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
mv .travis/id_rsa "$HOME/.ssh/id_rsa"
chmod 600 "$HOME/.ssh/id_rsa"
mkdir -p "$HOME/.gpg"
gpg --batch --import .travis/release-signing-key-82DE7BE82166E84E.gpg
if travis_isLinux; then
mkdir -p "$HOME/.gpg"
gpg --batch --import .travis/release-signing-key-82DE7BE82166E84E.gpg
else
log_info "Not setting up gpg for ${TRAVIS_OS_NAME}."
# Note: importing keys into gpg will start gpg-agent. This background task then
# prevents travis-ci from terminating the build job under Windows.
# Alternatively "gpgconf --kill gpg-agent" can be executed to stop the
# gpg-agent at the end, if the gpg keys are needed.
fi
rm .travis/secrets.tar
rm .travis/release-signing-key-82DE7BE82166E84E.gpg