mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 04:56:58 +02:00
enter_chroot: add support for passing through GNUPGHOME
When running under jenkins the $GNUPGHOME may be located under the current build directory instead of $HOME to avoid conflicting with other jobs on the same build host.
This commit is contained in:
parent
7cea7f4d6f
commit
39a3a48a18
@ -231,6 +231,7 @@ load_environment_whitelist() {
|
||||
GIT_PROXY_COMMAND
|
||||
GIT_SSH
|
||||
RSYNC_PROXY
|
||||
GNUPGHOME
|
||||
GPG_AGENT_INFO
|
||||
SSH_AGENT_PID
|
||||
SSH_AUTH_SOCK
|
||||
|
@ -293,9 +293,10 @@ setup_env() {
|
||||
fi
|
||||
|
||||
# Mount GnuPG's data directory for signing uploads
|
||||
if [[ -d "$SUDO_HOME/.gnupg" ]]; then
|
||||
: ${GNUPGHOME:="$SUDO_HOME/.gnupg"}
|
||||
if [[ -d "${GNUPGHOME}" ]]; then
|
||||
debug "Mounting GnuPG"
|
||||
setup_mount "${SUDO_HOME}/.gnupg" "--bind" "/home/${SUDO_USER}/.gnupg"
|
||||
setup_mount "${GNUPGHOME}" "--bind" "${GNUPGHOME}"
|
||||
|
||||
# bind mount the gpg agent dir if available
|
||||
GPG_AGENT_DIR="${GPG_AGENT_INFO%/*}"
|
||||
|
Loading…
Reference in New Issue
Block a user