Skip to content

Commit

Permalink
CloudBuild for a "development" subdomain
Browse files Browse the repository at this point in the history
Once this is live, we can setup a development.agones.dev
that has the latest version of site from master live at all
times.

This also makes documentation for release candidates easier,
as we can point them at this development release site.
  • Loading branch information
markmandel committed Feb 6, 2019
1 parent dcb7dfa commit ef6b07d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions site/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,33 @@ steps:
args: ["pull-build-image"] # since we are past CI build, we can assume that the build image exists.

#
# Build site and deploy
# Build production site and deploy
#

- 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 && mv ./site ./go/src && cp -r ./vendor/gopkg.in ./go/src && ls -a ./go/src/site"]
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"
args: ["app", "deploy", ".app.yaml", "--promote", "--version=$SHORT_SHA"]
env:
- GOPATH=/workspace/go

#
# Build development site and deploy
#

- 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 && cp -r ./vendor/gopkg.in ./go/src && ls -a ./go/src/site"]
- name: "gcr.io/cloud-builders/gcloud" # deploy the preview of the website
dir: "go/src/site"
args: ["app", "deploy", ".app.yaml", "--promote", "--version=$SHORT_SHA"]
env:
- GOPATH=/workspace/go

tags: ["site"]

0 comments on commit ef6b07d

Please sign in to comment.