#!/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 |