This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also: * Pinning the terraform-google-kubernetes-engine module to 6.2.0 due to breaking change: terraform-google-modules/terraform-google-kubernetes-engine#257 * Cleaning buckets before removing them (TF fails otherwise) Fixes: http://b/148036307 Change-Id: Icde3335ee8690190ac87c46a9cbde265f263e84c
- Loading branch information
Showing
6 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash -xe | ||
|
||
if [ -z ${GITLAB_HOSTNAME} ];then | ||
read -p "What is the GitLab hostname (i.e. my.gitlab.server)? " GITLAB_HOSTNAME | ||
fi | ||
|
||
if [ -z ${GITLAB_TOKEN} ];then | ||
read -p "What is the GitLab token? " GITLAB_TOKEN | ||
fi | ||
|
||
wget -O anthos-platform-cli https://storage.googleapis.com/solutions-public-assets/anthos-platform-cli/v0.4.0/anthos-platform-cli-v0.4.0-linux-amd64 | ||
chmod +x anthos-platform-cli | ||
|
||
./anthos-platform-cli add app --name microservices-demo --gitlab-hostname ${GITLAB_HOSTNAME} \ | ||
--gitlab-token ${GITLAB_TOKEN} --template-name golang-template | ||
|
||
git clone https://root:${GITLAB_TOKEN}@${GITLAB_HOSTNAME}/microservices-demo/microservices-demo.git microservices-demo-clone | ||
cd microservices-demo-clone | ||
git rm -r Dockerfile main.go skaffold.yaml k8s | ||
mkdir hydrated-manifests | ||
curl -o hydrated-manifests/stg.yaml https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/master/release/kubernetes-manifests.yaml | ||
# workaround for b/148377817 -- gke-deploy doesn't like a yaml file finishing with "---" | ||
sed -i '$ d' hydrated-manifests/stg.yaml | ||
cp hydrated-manifests/stg.yaml hydrated-manifests/prod.yaml | ||
cat <<EOF >.gitlab-ci.yml | ||
include: | ||
- project: 'platform-admins/shared-ci-cd' | ||
file: 'cd/push-manifests.yaml' | ||
stages: | ||
- push-manifests | ||
EOF | ||
git add . | ||
git commit -m "Removing template and adding microservices-demo app" | ||
git push | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters