02e40ba6251fd2904a45c07d9ca276734a2f2c8b — HokieGeek a month ago 583a58f
Added auto-accept for gcloud deploy
3 files changed, 2 insertions(+), 21 deletions(-)

M .build.yml
D function_test.go
D gcpdeploy.sh
M .build.yml => .build.yml +2 -6
@@ 14,17 14,13 @@ CI_COMMIT_TAG: $(git --work-tree=./hokiegeek.net --git-dir=./hokiegeek.net/.git describe)
    CI_REGISTRY: gcr.io
    CI_REGISTRY_USER: hokiegeek-net
-   PATH: ${PATH}:$HOME/google-cloud-sdk/bin
  secrets:
    - 3c7786a3-e027-4018-bc74-42a1492176d5 # gcp key
  tasks:
    - docker_setup: |
        sudo mount -t tmpfs -o size=4G /dev/null /dev/shm
-       sudo systemctl start cgconfig
-       sleep 2
        sudo nohup dockerd --bip 172.18.0.1/16 </dev/null >/dev/null 2>&1 &
-       sleep 5
-       sudo gpasswd -a $(whoami) group
+       sudo gpasswd -a $(whoami) docker
    - gcloud_setup: |
        gcloud auth activate-service-account --key-file=$HOME/.gcp_cloudrunner_key.json
        gcloud config set project ${GCP_PROJ}


@@ 45,4 41,4 @@ docker push $IMAGE_TAG
        docker push $IMAGE_LATEST_TAG
    - deploy: |
-       yes | gcloud beta run deploy ${GCP_RUN_SVC} --image ${CI_REGISTRY}/${CI_REGISTRY_USER}/${PROJ} --platform managed --region us-east1 || gcloud info --run-diagnostics
+       gcloud --quiet beta run deploy ${GCP_RUN_SVC} --image ${CI_REGISTRY}/${CI_REGISTRY_USER}/${PROJ} --platform managed --region us-east1 --allow-unauthenticated --memory 128Mi

D function_test.go => function_test.go +0 -13
@@ 1,13 0,0 @@-package hokiegeeknet
- 
- import (
- 	"log"
- 	"net/http"
- 	"testing"
- )
- 
- func TestHome(t *testing.T) {
- 	t.Skip("Bad to test this!")
- 	http.HandleFunc("/", Home)
- 	log.Fatal(http.ListenAndServe(":10000", nil))
- }

D gcpdeploy.sh => gcpdeploy.sh +0 -2
@@ 1,2 0,0 @@-#!/bin/sh
- gcloud --project hokiegeek-net functions deploy hghome --memory 128MB --runtime go111 --source . --entry-point Home --trigger-http