forked from cloudnativedevops/demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
41 lines (36 loc) · 897 Bytes
/
cloudbuild.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
steps:
# build only the first stage, so we can run tests with it
- id: build-test-image
dir: hello-cloudbuild
name: gcr.io/cloud-builders/docker
entrypoint: bash
args:
- -c
- |
docker image build --target build --tag demo:test .
- id: run-tests
dir: hello-cloudbuild
name: gcr.io/cloud-builders/docker
entrypoint: bash
args:
- -c
- |
docker container run demo:test go test
- id: build-app
dir: hello-cloudbuild
name: gcr.io/cloud-builders/docker
entrypoint: bash
args:
- -c
- |
docker image build --tag gcr.io/${PROJECT_ID}/demo:${COMMIT_SHA} .
- id: kubeval
dir: hello-cloudbuild
name: cloudnatived/helm-cloudbuilder
entrypoint: sh
args:
- -c
- |
helm template ./k8s/demo/ | kubeval
images:
- gcr.io/${PROJECT_ID}/demo:${COMMIT_SHA}