Fix
parent
8c1c4c3ef7
commit
663ac7ad3b
|
|
@ -101,8 +101,13 @@ jobs:
|
|||
service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
|
||||
- id: read-k8s-config
|
||||
run: |
|
||||
downloadCluster=$(gcloud container clusters list --project $GKE_PROJECT --format="json" | jq '.[] | select(.name == "${{env.GKE_CLUSTER}}")')
|
||||
[ -z "$downloadCluster" ] && gcloud components install beta && gcloud beta container --project "unitykubernetesbuilder" clusters create ${{env.GKE_CLUSTER}} --zone "us-central1-c" --no-enable-basic-auth --cluster-version "1.14.10-gke.36" --machine-type "custom-1-2048" --image-type "COS" --disk-type "pd-standard" --disk-size "25" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "1" --enable-stackdriver-kubernetes --enable-ip-alias --network "projects/unitykubernetesbuilder/global/networks/default" --subnetwork "projects/unitykubernetesbuilder/regions/us-central1/subnetworks/default" --default-max-pods-per-node "110" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0 &&
|
||||
sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
|
||||
downloadCluster=$(gcloud container clusters list --project $GKE_PROJECT --format="json" | jq '.[] | select(.name == "${{env.GKE_CLUSTER}}")')
|
||||
if [ -z "$downloadCluster" ]; then
|
||||
gcloud components install beta
|
||||
gcloud beta container --project $GKE_PROJECT clusters create $GKE_CLUSTER --async --zone $GKE_ZONE --no-enable-basic-auth --cluster-version "1.14.10-gke.36" --machine-type "custom-1-2048" --image-type "COS" --disk-type "pd-standard" --disk-size "25" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "1" --enable-stackdriver-kubernetes --enable-ip-alias --network "projects/unitykubernetesbuilder/global/networks/default" --subnetwork "projects/unitykubernetesbuilder/regions/us-central1/subnetworks/default" --default-max-pods-per-node "110" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
|
||||
fi;
|
||||
retry -s 5 -t 10 -v 'gcloud container clusters list --project $GKE_PROJECT --format="json" | jq ".[] | {name: .name, status: .status} | select(.name == \"$GKE_CLUSTER\") | select(.status != \"PROVISIONING\")" || exit 1'
|
||||
gcloud container clusters get-credentials $GKE_CLUSTER \
|
||||
--zone $GKE_ZONE --project $GKE_PROJECT
|
||||
# run a command to get access-token
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -130,7 +130,7 @@ class Kubernetes {
|
|||
'-c',
|
||||
`export GITHUB_TOKEN=$(cat /credentials/GITHUB_TOKEN);
|
||||
cd /data;
|
||||
git clone https://github.com/${process.env.GITHUB_REPOSITORY} repo;
|
||||
git clone https://github.com/${process.env.GITHUB_REPOSITORY}.git repo;
|
||||
git clone https://github.com/webbertakken/unity-builder.git builder;
|
||||
cd repo;
|
||||
git checkout $GITHUB_SHA;
|
||||
|
|
|
|||
Loading…
Reference in New Issue