Move gitsync stuff to bazel-trusted-encrypted-secrets
# direction can be ==> or <=>
REPOSITORIES=(
"https://bazel.googlesource.com/bazel ==> git@github.com:bazelbuild/bazel.git bazel"
- "https://bazel.googlesource.com/tulsi ==> git@github.com:bazelbuild/tulsi.git tulsi"
- "https://bazel.googlesource.com/eclipse <=> git@github.com:bazelbuild/eclipse.git eclipse"
"https://bazel.googlesource.com/bazel-toolchains <=> git@github.com:bazelbuild/bazel-toolchains.git bazel-toolchains"
- "https://bazel.googlesource.com/rules_cc ==> git@github.com:bazelbuild/rules_cc.git rules_cc"
+ "https://bazel.googlesource.com/eclipse <=> git@github.com:bazelbuild/eclipse.git eclipse"
"https://bazel.googlesource.com/java_tools ==> git@github.com:bazelbuild/java_tools.git java_tools"
+ "https://bazel.googlesource.com/rules_cc ==> git@github.com:bazelbuild/rules_cc.git rules_cc"
+ "https://bazel.googlesource.com/tulsi ==> git@github.com:bazelbuild/tulsi.git tulsi"
)
set -euxo pipefail
# Download & decrypt gitcookies.
-gsutil cat "gs://bazel-encrypted-secrets/gitsync-cookies.enc" | \
+gsutil cat "gs://bazel-trusted-encrypted-secrets/gitsync-cookies.enc" | \
gcloud kms decrypt --location "global" --keyring "buildkite" --key "gitsync-cookies-key" --plaintext-file "-" --ciphertext-file "-" \
> /home/gitsync/.gitcookies
chmod 0600 /home/gitsync/.gitcookies
# Download & decrypt GitHub SSH key.
-gsutil cat "gs://bazel-encrypted-secrets/gitsync-ssh.enc" | \
+gsutil cat "gs://bazel-trusted-encrypted-secrets/gitsync-ssh.enc" | \
gcloud kms decrypt --location "global" --keyring "buildkite" --key "gitsync-ssh-key" --plaintext-file "-" --ciphertext-file "-" \
> /home/gitsync/.ssh/id_rsa
chmod 0600 /home/gitsync/.ssh/id_rsa
