-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
56 lines (53 loc) · 1.33 KB
/
cloudbuild.yaml
File metadata and controls
56 lines (53 loc) · 1.33 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
steps:
- id: 'Create .env file'
name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:alpine'
args:
- sh
- -c
- |
echo "SENTRY_DSN=''" > .env
- id: 'Build image'
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- -c
- |
docker build \
--target dev \
-t europe-west1-docker.pkg.dev/${PROJECT_ID}/hubblehq-docker/request \
.
- id: 'Run linting'
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- -c
- |
docker compose \
-f docker-compose.yml \
--profile dev \
run \
--rm \
dev yarn lint
waitFor: ['Build image']
- id: 'Run tests'
name: 'gcr.io/cloud-builders/docker'
entrypoint: 'sh'
args:
- -c
- |
docker compose \
-f docker-compose.yml \
--profile dev \
run \
--rm \
dev yarn test
waitFor: ['Build image', 'Run linting']
substitutions:
_SERVICE_NAME: request
_BUILD_ID_SHORT: ${BUILD_ID:0:8}
_DOCKER_TAG: ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/hubblehq-docker/${_SERVICE_NAME}
_DOCKER_TAG_SCRIPTS: ${LOCATION}-docker.pkg.dev/${PROJECT_ID}/hubblehq-docker/${_SERVICE_NAME}-scripts
options:
dynamicSubstitutions: true
machineType: 'E2_HIGHCPU_8'
logging: CLOUD_LOGGING_ONLY