Skip to content

Commit 2150463

Browse files
authored
Merge pull request #75 from laverya/reenable-darwin-windows-builds
build darwin and windows binaries without cgo
2 parents f6d8ae1 + 714f432 commit 2150463

File tree

3 files changed

+51
-9
lines changed

3 files changed

+51
-9
lines changed

.buildkite/pipeline.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
steps:
22
- label: build
33
commands:
4-
- make kots ffi ci-test
4+
- make ci-test
55
plugins:
66
- docker#v3.2.0:
77
image: replicated/gitops-builder:buildkite-go12-node10
88
always-pull: true
99
mount-checkout: true
1010
workdir: /go/src/github.com/replicatedhq/kots
1111

12+
13+
- label: snapshot-release
14+
commands:
15+
- make snapshot-release
16+
plugins:
17+
- docker#v3.2.0:
18+
always-pull: true
19+
image: replicated/gitops-builder:buildkite-go12-node10
20+
workdir: /go/src/github.com/replicatedhq/kots
21+
volumes:
22+
- "/var/run/docker.sock:/var/run/docker.sock"
23+
- "/var/lib/buildkite-agent/.docker/config.json:/home/builder/.docker/config.json"
24+
1225
- wait
1326

1427
- label: release

deploy/.goreleaser.snapshot.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ release:
44
owner: replicatedhq
55
name: kots
66
builds:
7-
- id: kots
7+
- id: kots-linux
88
goos:
99
- linux
10-
# - windows
11-
# - darwin
1210
goarch:
1311
- amd64
14-
# - "386"
1512
env:
1613
- CGO_ENABLED=1
1714
- GO111MODULE=on
@@ -23,6 +20,23 @@ builds:
2320
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
2421
binary: kots
2522
hooks: {}
23+
- id: kots
24+
goos:
25+
- windows
26+
- darwin
27+
goarch:
28+
- amd64
29+
env:
30+
- CGO_ENABLED=0
31+
- GO111MODULE=on
32+
main: cmd/kots/main.go
33+
ldflags: -s -w
34+
-X github.com/replicatedhq/kots/pkg/version.version={{.Version}}
35+
-X github.com/replicatedhq/kots/pkg/version.gitSHA={{.FullCommit}}
36+
-X github.com/replicatedhq/kots/pkg/version.buildTime={{.Date}}
37+
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
38+
binary: kots
39+
hooks: {}
2640
- id: so
2741
goos:
2842
- linux

deploy/.goreleaser.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ release:
44
owner: replicatedhq
55
name: kots
66
builds:
7-
- id: kots
7+
- id: kots-linux
88
goos:
99
- linux
10-
# - windows
11-
# - darwin
1210
goarch:
1311
- amd64
14-
# - "386"
1512
env:
1613
- CGO_ENABLED=1
1714
- GO111MODULE=on
@@ -23,6 +20,23 @@ builds:
2320
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
2421
binary: kots
2522
hooks: {}
23+
- id: kots
24+
goos:
25+
- windows
26+
- darwin
27+
goarch:
28+
- amd64
29+
env:
30+
- CGO_ENABLED=0
31+
- GO111MODULE=on
32+
main: cmd/kots/main.go
33+
ldflags: -s -w
34+
-X github.com/replicatedhq/kots/pkg/version.version={{.Version}}
35+
-X github.com/replicatedhq/kots/pkg/version.gitSHA={{.FullCommit}}
36+
-X github.com/replicatedhq/kots/pkg/version.buildTime={{.Date}}
37+
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
38+
binary: kots
39+
hooks: {}
2640
- id: so
2741
goos:
2842
- linux
@@ -44,6 +58,7 @@ archives:
4458
- id: kots
4559
builds:
4660
- kots
61+
- kots-linux
4762
format: tar.gz
4863
format_overrides:
4964
- goos: windows

0 commit comments

Comments
 (0)