-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
33 lines (25 loc) · 1.41 KB
/
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
# This container takes a while to build
timeout: 1600s
steps:
# Clone the repo
- name: 'gcr.io/cloud-builders/git'
args: ['clone', 'https://github.com/hutomadotAI/web-api.git']
# Build the API (all dependent services) - ignore CVEs and checks as these should have been run previously
- name: "gcr.io/cloud-builders/mvn:3.3.9-jdk-8"
args: ['package',
'-f', 'service/pom.xml']
# Build the images
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'eu.gcr.io/hutoma-backend/api/db:$BRANCH_NAME-$SHORT_SHA', '-t', 'eu.gcr.io/hutoma-backend/api/db:latest', 'db']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'eu.gcr.io/hutoma-backend/api/service:$BRANCH_NAME-$SHORT_SHA', '-t', 'eu.gcr.io/hutoma-backend/api/service:latest', 'service/core-service']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'eu.gcr.io/hutoma-backend/api/controller:$BRANCH_NAME-$SHORT_SHA', '-t', 'eu.gcr.io/hutoma-backend/api/controller:latest', 'service/controller-service']
# Push the images to the internal repo
images: ['eu.gcr.io/hutoma-backend/api/db:$BRANCH_NAME-$SHORT_SHA',
'eu.gcr.io/hutoma-backend/api/db:latest',
'eu.gcr.io/hutoma-backend/api/service:$BRANCH_NAME-$SHORT_SHA',
'eu.gcr.io/hutoma-backend/api/service:latest',
'eu.gcr.io/hutoma-backend/api/controller:$BRANCH_NAME-$SHORT_SHA',
'eu.gcr.io/hutoma-backend/api/controller:latest'
]