This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdibs.yaml
108 lines (108 loc) · 4.39 KB
/
dibs.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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
targets:
- name: linux
helm:
src: charts/gomather
dist: .bin/chart
dockerManifest: pojntfx/gomather:latest
platforms:
- identifier: linux/amd64
paths:
watch: .
include: (.*)\.go
assetInImage: /usr/local/bin/gomather
assetOut: .bin/binaries/gomather-linux-amd64
gitRepoRoot: .
commands:
generateSources: go generate ./...
build: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -tags netgo -ldflags '-extldflags "-static"' -o .bin/binaries/gomather-linux-amd64 main.go
unitTests: go test -v ./...
integrationTests: .bin/binaries/gomather-linux-amd64 --help
imageTests: docker run --platform linux/amd64 -e DIBS_TARGET=linux -e TARGETPLATFORM=linux/amd64 pojntfx/gomather:linux-amd64 /usr/local/bin/gomather --help
chartTests: helm install gomather .bin/chart/gomather-*.tgz && helm delete gomather
start: |
if [ "$DIBS_DEBUG" = "true" ]; then
pkill -9 dlv || true
pkill -9 gomather || true
.bin/binaries/gomather-linux-amd64 start &
dlv attach $! --headless --listen=:31441 --api-version=2 --accept-multiclient || true
else
.bin/binaries/gomather-linux-amd64 start
fi
docker:
build:
file: Dockerfile
context: .
tag: pojntfx/gomather:linux-amd64
unitTests:
file: Dockerfile.unitTests
context: .
tag: pojntfx/gomather-unit-tests:linux-amd64
integrationTests:
file: Dockerfile.integrationTests
context: .
tag: pojntfx/gomather-integration-tests:linux-amd64
chartTests:
file: Dockerfile.chartTests
context: .
tag: pojntfx/gomather-chart-tests:linux-amd64
- identifier: linux/arm64
paths:
watch: .
include: (.*)\.go
assetInImage: /usr/local/bin/gomather
assetOut: .bin/binaries/gomather-linux-arm64
gitRepoRoot: .
commands:
generateSources: go generate ./...
build: GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -tags netgo -ldflags '-extldflags "-static"' -o .bin/binaries/gomather-linux-arm64 main.go
unitTests: go test -v ./...
integrationTests: .bin/binaries/gomather-linux-arm64 --help
imageTests: docker run --platform linux/arm64 -e DIBS_TARGET=linux -e TARGETPLATFORM=linux/arm64 pojntfx/gomather:linux-arm64 /usr/local/bin/gomather --help
chartTests: helm install gomather .bin/chart/gomather-*.tgz && helm delete gomather
start: |
if [ "$DIBS_DEBUG" = "true" ]; then
pkill -9 dlv || true
pkill -9 gomather || true
.bin/binaries/gomather-linux-arm64 start &
dlv attach $! --headless --listen=:31441 --api-version=2 --accept-multiclient || true
else
.bin/binaries/gomather-linux-arm64 start
fi
docker:
build:
file: Dockerfile
context: .
tag: pojntfx/gomather:linux-arm64
unitTests:
file: Dockerfile.unitTests
context: .
tag: pojntfx/gomather-unit-tests:linux-arm64
integrationTests:
file: Dockerfile.integrationTests
context: .
tag: pojntfx/gomather-integration-tests:linux-arm64
chartTests:
file: Dockerfile.chartTests
context: .
tag: pojntfx/gomather-chart-tests:linux-arm64
- name: darwin
platforms:
- identifier: darwin/amd64
paths:
watch: .
include: (.*)\.go
gitRepoRoot: .
commands:
generateSources: go generate ./...
build: GOOS=darwin GOARCH=amd64 go build -o .bin/binaries/gomather-darwin-amd64 main.go
unitTests: go test -v ./...
integrationTests: .bin/binaries/gomather-darwin-amd64 --help
start: |
if [ "$DIBS_DEBUG" = "true" ]; then
pkill -9 dlv || true
pkill -9 gomather || true
.bin/binaries/gomather-darwin-arm64 start &
dlv attach $! --headless --listen=:31441 --api-version=2 --accept-multiclient || true
else
.bin/binaries/gomather-darwin-arm64 start
fi