-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
48 lines (38 loc) · 1.21 KB
/
Taskfile.yaml
File metadata and controls
48 lines (38 loc) · 1.21 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
version: 3
tasks:
githooks:
cmds:
- git config core.hooksPath .githooks
ci:
cmds:
- task ci-lint
- task ci-test
ci-lint:
cmds:
- docker image inspect privatecloud-cli-ci-lint:0.0.1 > /dev/null 2>&1 || docker build --platform=linux/amd64 -t privatecloud-cli-ci-lint:0.0.1 -f ./ci/lint.dockerfile .
- docker run --platform linux/amd64 --rm -v $(pwd):/app privatecloud-cli-ci-lint:0.0.1
ci-test:
cmds:
- docker image inspect privatecloud-cli-ci-test:0.0.1 > /dev/null 2>&1 || docker build --platform=linux/amd64 -t privatecloud-cli-ci-test:0.0.1 -f ./ci/test.dockerfile .
- docker run --platform linux/amd64 --rm -v $(pwd):/app privatecloud-cli-ci-test:0.0.1
build:
cmds:
- go build -o privatecloud-cli
run:
cmds:
- go run . {{.CLI_ARGS}}
check:
cmds:
- go run . check {{.CLI_ARGS}}
install:
cmds:
- go run . install {{.CLI_ARGS}}
pod:
cmds:
- go run . pod {{.CLI_ARGS}}
pod-image-build:
cmds:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o privatecloud-cli
- docker build --platform=linux/amd64 -t privatecloud-cli-pod:$VERSION -f ./pod.dockerfile .
env:
VERSION: dev