Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove decrypt GPG key step from deployment #1191

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,7 @@ def update_config(ctx):
print(f"# Update configuration files")
ask_to_run_command(f"cd /local/data && ./fetch-isaac-sops-config.sh")
print(f"# Decrypt configuration files")
# GPG would normally prompt us for the key password, but it's not possible to answer that prompt through subprocess.run().
# Instead, we ask for it here and pass it in to the subprocess as an environment variable.
gpg_password = getpass.getpass("Enter password for SOPS GPG key: ")
ask_to_run_command(f"cd /local/src/isaac-sops-config && ./deploy_in_docker.sh /local/data/keys/$(hostname)_gpg.ppk /local/src/isaac-sops-config /local/data/isaac-sops-config-decrypted {ctx['env']} {ctx['site']}", env_vars={"GPG_KEY_PASSWORD": gpg_password})
ask_to_run_command(f"cd /local/src/isaac-sops-config && ./deploy_in_docker.sh /local/data/keys/$(hostname)_gpg.ppk /local/src/isaac-sops-config /local/data/isaac-sops-config-decrypted {ctx['env']} {ctx['site']}")


def run_db_migrations(ctx):
Expand Down