-
Notifications
You must be signed in to change notification settings - Fork 2
/
cloudbuild.yaml
28 lines (23 loc) · 993 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
steps:
- name: 'adoptopenjdk/openjdk8'
entrypoint: './sbt'
args: ['test']
- name: 'gcr.io/cloudrun/pack'
args: ['build', '--builder=heroku/buildpacks:18', '--publish', 'gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA']
#- name: 'gcr.io/cloud-builders/gcloud'
# args: ['run', 'deploy', '--image=gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA', '--platform=managed', '--project=$PROJECT_ID', '--region=us-central1', '--allow-unauthenticated', '--memory=512Mi', 'cloudbowl']
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: '/bin/sh'
args:
- '-c'
- |
sed -e 's/$$PROJECT_ID/'"$PROJECT_ID"'/g' kubernetes.yaml.tpl | \
sed -e 's/$$REPO_NAME/'"$REPO_NAME"'/g' | \
sed -e 's/$$COMMIT_SHA/'"$COMMIT_SHA"'/g' > kubernetes.yaml
- name: gcr.io/cloud-builders/kubectl
args: ['apply', '-f', 'kubernetes.yaml']
env:
- 'CLOUDSDK_COMPUTE_REGION=${_CLOUDSDK_COMPUTE_REGION}'
- 'CLOUDSDK_CONTAINER_CLUSTER=${_CLOUDSDK_CONTAINER_CLUSTER}'
options:
machineType: 'N1_HIGHCPU_8'