Skip to content

Commit

Permalink
Add documentation for use with Google Cloud Build (#170)
Browse files Browse the repository at this point in the history
Signed-off-by: Naseem <naseemkullah@gmail.com>
  • Loading branch information
naseemkullah authored and unguiculus committed Sep 12, 2019
1 parent e731d94 commit 7da298b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/gcp-cloud-build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Chart testing example with Google Cloud Build

This example shows how to lint and test charts using [Google Cloud Build](https://cloud.google.com/cloud-build/)

Since Google Cloud Build will ignore copying over `.git` by default, you will need to initialize `git` and add a `remote`. This example assumes that there is a pre-existing GKE cluster with `helm` already installed.
30 changes: 30 additions & 0 deletions examples/gcp-cloud-build/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
steps:

- name: 'gcr.io/cloud-builders/git'
id: 'git-init'
args: ['init']
waitFor: ['-']

- name: 'gcr.io/cloud-builders/git'
id: 'git-add-remote'
args: ['remote', 'add', 'origin', 'git@github.com:github-account/charts-repo.git']
waitFor: ['git-init']

- name: 'gcr.io/cloud-builders/kubectl'
id: 'cluster-info'
args: ['cluster-info']
waitFor: ['git-add-remote']

- name: quay.io/helmpack/chart-testing
id: 'lint-and-install-charts'
entrypoint: 'ct'
args: ['lint-and-install']
waitFor: ['cluster-info']

options:
env:
- CLOUDSDK_COMPUTE_ZONE=cluster-location
- CLOUDSDK_CONTAINER_CLUSTER=cluster-name

timeout:
3600s

0 comments on commit 7da298b

Please sign in to comment.