blob: fa9edcc13562e4adbfe48a28a1f3eff2cace4f44 [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
jenkins:
securityRealm:
googleOAuth2:
clientId: "${clientid}"
clientSecret: "${clientsecret}"
domain: "google.com"
# Indentation matters! DO NOT EDIT MANUALLY!
EOF