-
Notifications
You must be signed in to change notification settings - Fork 3
/
cloudbuild.yaml
38 lines (38 loc) · 1.27 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
31
32
33
34
35
36
37
38
steps:
# Load images for cachig
- name: 'gcr.io/cloud-builders/docker'
args: [ 'pull', 'eu.gcr.io/$PROJECT_ID/audioslides-io:latest' ]
- name: 'gcr.io/cloud-builders/docker'
args: [ 'pull', 'eu.gcr.io/$PROJECT_ID/audioslides-io-test-runner:latest' ]
# Build test-runner image
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--build-arg', 'MIX_ENV=test',
'--cache-from', 'eu.gcr.io/$PROJECT_ID/audioslides-io-test-runner:latest',
'-t', 'eu.gcr.io/$PROJECT_ID/audioslides-io-test-runner:latest',
'.' ]
# Run Tests with test-runner
# - name: 'docker/compose:1.18.0'
# args: [ 'run',
# '-e', 'COVERALLS_REPO_TOKEN=$_COVERALLS_REPO_TOKEN',
# 'test',
# 'mix', 'coveralls.post',
# '--branch', '$BRANCH_NAME',
# '--sha', '$COMMIT_SHA'
# ]
# Build production image
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--cache-from', 'eu.gcr.io/$PROJECT_ID/audioslides-io:latest',
'-t', 'eu.gcr.io/$PROJECT_ID/audioslides-io:latest',
'-t', 'eu.gcr.io/$PROJECT_ID/audioslides-io:prod',
'.' ]
# publish following images
images:
- 'eu.gcr.io/$PROJECT_ID/audioslides-io:latest'
- 'eu.gcr.io/$PROJECT_ID/audioslides-io:prod'
- 'eu.gcr.io/$PROJECT_ID/audioslides-io-test-runner:latest'
# Timeout 20min (Default 10min)
timeout: 1200s