-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcloudbuild.yaml
25 lines (25 loc) · 1.51 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
steps:
- name: gcr.io/cloud-builders/git
args: ['submodule', 'update', '--init', '--recursive']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c',
'docker pull us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:build ||
docker pull us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:latest ||
exit 0']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--target', 'build',
'-t', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:build',
'--cache-from', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:build',
'.']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:${TAG_NAME}',
'-t', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:latest',
'--cache-from', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:build',
'--cache-from', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:latest', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:${TAG_NAME}']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:build']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/super-metroid-map-randomizer/map-randomizer/app:latest']