| #!/bin/bash |
| |
| PRIVKEY_NAME="mendel-linux-signing-key" |
| PASSPHRASE_NAME="mendel-linux-signing-key-passphrase" |
| |
| set -e |
| |
| echo "Fetching Mendel release credentials" |
| |
| install -d -m 700 $HOME/.gke-jenkins/ |
| install -d -m 700 $HOME/.gke-jenkins/release-credentials |
| |
| gcloud --project=mendel-linux-cloud-infra \ |
| secrets versions access latest --secret="${PRIVKEY_NAME}" \ |
| | base64 -d \ |
| > $HOME/.gke-jenkins/release-credentials/release-keyring.tar.gz |
| |
| gcloud --project=mendel-linux-cloud-infra \ |
| secrets versions access latest --secret="${PASSPHRASE_NAME}" \ |
| > $HOME/.gke-jenkins/release-credentials/passphrase.txt |