-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunfile.yml
77 lines (65 loc) · 1.74 KB
/
Runfile.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
tasks:
default:
silent: true
cmds:
- |+
echo "initialize the project with the following command"
echo "task init repo=<git-repo> user=<git-user>"
init:
env:
repo:
required: true
user:
required: true
domain:
default:
value: "github.com"
# silent: true
cmd:
- |
if [ ! -f "go.mod" ]; then
mkdir -p .tmp
mv * .tmp
repo_url="$domain/$user/$repo"
go mod init $repo_url
kubebuilder init --domain $repo.$user.$domain --license apache2
mv .tmp/* . && rm -rf .tmp
fi
new:api:
desc: create a new api
requires:
- sh: test -f "PROJECT"
env:
version:
required: true
kind:
required: true
cmd:
- |
kubebuilder create api --version ${version} --kind ${kind} --resource --controller
manifests:
cmd:
- make manifests
- make generate
dev:
env:
HELM_JOB_IMAGE: "ghcr.io/kloudlite/kloudlite/operator/workers/helm-job-runner:v1.1.4"
cmd:
- make run
go:build:
env:
CGO_ENABLED: 0
GOARCH:
default:
sh: "go env GOARCH"
cmd:
- go build -ldflags='-s -w' -o ./bin/plugin-helm-controller-$GOARCH ./cmd
build:
env:
HELM_JOB_IMAGE: "ghcr.io/kloudlite/kloudlite/operator/workers/helm-job-runner:v1.1.4"
image:
required: true
cmd:
- GOARCH=amd64 run go:build || echo "hi"
- GOARCH=arm64 run go:build || echo "hello"
- docker buildx build -t "$image" --output=type=image,compression=zstd,force-compression=true,compression-level=12,push=true --platform linux/amd64,linux/arm64 --build-arg BINARY=./bin/plugin-helm-controller .