-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
31 lines (29 loc) · 883 Bytes
/
Taskfile.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
25
26
27
28
29
30
31
version: "2"
vars:
CONTAINER_USER: googler
CONTAINER_GROUP: googler
GOOGLE_CLOUD_SDK_VERSION: 327.0.0
TERRAFORM_VERSION: 0.14.7
IMAGE_NAME: huy123/cloud-shell
DETAILED_TAG: "{{.IMAGE_NAME}}:{{.GOOGLE_CLOUD_SDK_VERSION}}-TF{{.TERRAFORM_VERSION}}"
LATEST_TAG: "{{.IMAGE_NAME}}:latest"
tasks:
build:
cmds:
- >
sed
's/GOOGLE_CLOUD_SDK_VERSION/{{.GOOGLE_CLOUD_SDK_VERSION}}/g'
Dockerfile.template
|
docker build
-t {{.DETAILED_TAG}}
-t {{.LATEST_TAG}}
--build-arg CONTAINER_USER={{.CONTAINER_USER}}
--build-arg CONTAINER_GROUP={{.CONTAINER_GROUP}}
--build-arg TERRAFORM_VERSION={{.TERRAFORM_VERSION}}
-
push:
cmds:
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
- docker push {{.DETAILED_TAG}}
- docker push {{.LATEST_TAG}}