diff --git a/build/includes/website.mk b/build/includes/website.mk index cdb075c46c..257d3a3ec1 100644 --- a/build/includes/website.mk +++ b/build/includes/website.mk @@ -49,9 +49,9 @@ site-gen-app-yaml: site-deploy: site-gen-app-yaml site-static docker run -t --rm $(common_mounts) --workdir=$(mount_path) $(DOCKER_RUN_ARGS) \ - -e GOPATH=/tmp/go -e GO111MODULE=on -e SHORT_SHA=$(shell git rev-parse --short=7 HEAD) $(build_tag) bash -c \ - 'printenv && mkdir -p $$GOPATH/src && cp -r ./site $$GOPATH/src && \ - cd $$GOPATH/src/site && gcloud app deploy .app.yaml --no-promote --quiet --version=$$SHORT_SHA' + -e GO111MODULE=on -e SHORT_SHA=$(shell git rev-parse --short=7 HEAD) $(build_tag) bash -c \ + 'printenv && cd ./site && \ + gcloud app deploy .app.yaml --no-promote --quiet --version=$$SHORT_SHA' site-static-preview: $(MAKE) site-static ARGS="-F" ENV="RELEASE_VERSION=$(base_version) RELEASE_BRANCH=master" diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 78d3d2e7f7..48e11fc4c1 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -216,16 +216,11 @@ steps: - tests dir: "build" args: ["site-static-preview", "site-gen-app-yaml", "SERVICE=preview"] -- name: "ubuntu" # fake a new gopath - id: site-gopath - waitFor: - - site-static - args: ["bash", "-c", "mkdir -p ./go/src && mv ./site ./go/src && ls -a ./go/src/site"] - name: "gcr.io/cloud-builders/gcloud" # deploy the preview of the website id: "deploy-site-static" waitFor: - - site-gopath - dir: "go/src/site" + - site-static + dir: "site" args: ["app", "deploy", ".app.yaml", "--no-promote", "--version=$SHORT_SHA"] env: - GOPATH=/workspace/go diff --git a/site/cloudbuild.yaml b/site/cloudbuild.yaml index 6aaa47dcb7..89ca2d0c7f 100644 --- a/site/cloudbuild.yaml +++ b/site/cloudbuild.yaml @@ -38,13 +38,12 @@ steps: - name: "make-docker" # build production version of the site dir: "build" args: ["site-static", "site-gen-app-yaml", "ENV=HUGO_ENV=production"] -- name: "ubuntu" # fake a new gopath - args: ["bash", "-c", "mkdir -p ./go/src && cp -r ./site ./go/src && cp -r ./vendor/gopkg.in ./go/src && ls -a ./go/src/site"] - name: "gcr.io/cloud-builders/gcloud" # deploy the website - dir: "go/src/site" + dir: "site" args: ["app", "deploy", ".app.yaml", "--promote", "--version=$SHORT_SHA"] env: - GOPATH=/workspace/go + - GO111MODULE=on # # Build development site and deploy @@ -54,12 +53,11 @@ steps: - name: "make-docker" # build a preview of the website dir: "build" args: ["site-static-preview", "site-gen-app-yaml", "SERVICE=development"] -- name: "ubuntu" # fake a new gopath - args: ["bash", "-c", "rm -r ./go/src && mkdir -p ./go/src && cp -r ./site ./go/src && ls -a ./go/src/site"] - name: "gcr.io/cloud-builders/gcloud" # deploy the preview of the website - dir: "go/src/site" + dir: "site" args: ["app", "deploy", ".app.yaml", "--promote", "--version=$SHORT_SHA"] env: - GOPATH=/workspace/go + - GO111MODULE=on tags: ["site"] \ No newline at end of file