-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yml
24 lines (24 loc) · 990 Bytes
/
cloudbuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'-t',
'${_REGISTRY_HOST}/$PROJECT_ID/$REPO_NAME/${_IMAGE}:${BRANCH_NAME}-${COMMIT_SHA}',
'-t',
'${_REGISTRY_HOST}/$PROJECT_ID/$REPO_NAME/${_IMAGE}:${BRANCH_NAME}-${SHORT_SHA}',
'-t',
'${_REGISTRY_HOST}/$PROJECT_ID/$REPO_NAME/${_IMAGE}:${BRANCH_NAME}',
'.'
]
timeout: 500s
images:
- '${_REGISTRY_HOST}/$PROJECT_ID/$REPO_NAME/${_IMAGE}:${BRANCH_NAME}-${COMMIT_SHA}'
- '${_REGISTRY_HOST}/$PROJECT_ID/$REPO_NAME/${_IMAGE}:${BRANCH_NAME}-${SHORT_SHA}'
- '${_REGISTRY_HOST}/$PROJECT_ID/$REPO_NAME/${_IMAGE}:${BRANCH_NAME}'
tags: # These are CloudBuild tags, not docker image tags
- '${BRANCH_NAME}-${COMMIT_SHA}'
- '${BRANCH_NAME}-${SHORT_SHA}'
- '${BRANCH_NAME}'
substitutions:
_REGISTRY_HOST: us-central1-docker.pkg.dev # Artifact Registry host
_IMAGE: disk-manager # Overriden by trigger. eg "argocd-custom-image", "jenkins-gke-deploy"