blob: 22c39c3f1dcbfa570e9aaadcb962dccf32eaa9cc [file] [log] [blame]
#!/bin/bash
set -e
echo "Generating ~/.gke-jenkins/oauth-credentials.yaml since you don't have one."
install -d -m 700 $HOME/.gke-jenkins
read -p "Please enter the OAuth2 Client ID here: " clientid
read -p "Please enter the OAuth2 Client Secret here: " clientsecret
cat <<EOF > $HOME/.gke-jenkins/oauth-credentials.yaml
securityRealm:
googleOAuth2:
clientId: "${clientid}"
clientSecret: "${clientsecret}"
domain: "google.com"
# Indentation matters! DO NOT EDIT MANUALLY!
EOF