Prevent interactive SSH in release CI
This commit is contained in:
7 files changed
+81
-28
No files matched your search
@@ -2,4 +2,21 @@
|
||||
set -euo pipefail
|
||||
|
||||
root_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
exec python3 "${root_dir}/scripts/prepare_release.py" "$@"
|
||||
credential_dir=
|
||||
cleanup() {
|
||||
if [[ -n $credential_dir ]]; then
|
||||
rm -rf -- "$credential_dir"
|
||||
fi
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
if [[ -n ${ECHOION_COMPONENT_SSH_KEY:-} ]]; then
|
||||
# shellcheck source=scripts/lib/component-ssh.sh
|
||||
source "$root_dir/scripts/lib/component-ssh.sh"
|
||||
credential_dir=$(mktemp -d)
|
||||
umask 077
|
||||
echoion_configure_component_ssh \
|
||||
"$credential_dir" "$ECHOION_COMPONENT_SSH_KEY"
|
||||
fi
|
||||
|
||||
python3 "${root_dir}/scripts/prepare_release.py" "$@"
|
||||
Reference in new issue
Block a user