@@ -28,46 +28,50 @@ before:
28
28
builds :
29
29
-id :coder-slim
30
30
dir :cmd/coder
31
- ldflags :
32
- ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
31
+ ldflags :["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
33
32
env :[CGO_ENABLED=0]
34
33
goos :[darwin, linux, windows]
35
- goarch :[amd64]
34
+ goarch :[amd64, arm, arm64]
35
+ goarm :["7"]
36
+ # Only build arm 7 for Linux
37
+ ignore :
38
+ -goos :windows
39
+ goarm :" 7"
40
+ -goos :darwin
41
+ goarm :" 7"
36
42
hooks :
37
43
# The "trimprefix" appends ".exe" on Windows.
38
44
post :|
39
- cp {{.Path}} site/out/bin/coder-{{ .Os }}-{{ .Arch }}{{ trimprefix .Name "coder" }}
45
+ cp {{.Path}} site/out/bin/coder-{{ .Os }}-{{ .Arch }}{{if .Arm }}v{{ .Arm }}{{ end }}{{ trimprefix .Name "coder" }}
40
46
41
47
-id :coder-linux
42
48
dir :cmd/coder
43
49
flags :[-tags=embed]
44
- ldflags :
45
- ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
50
+ ldflags :["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
46
51
env :[CGO_ENABLED=0]
47
52
goos :[linux]
48
- goarch :[amd64, arm64]
53
+ goarch :[amd64, arm, arm64]
54
+ goarm :["7"]
49
55
50
56
-id :coder-windows
51
57
dir :cmd/coder
52
58
flags :[-tags=embed]
53
- ldflags :
54
- ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
59
+ ldflags :["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
55
60
env :[CGO_ENABLED=0]
56
61
goos :[windows]
57
62
goarch :[amd64, arm64]
58
63
59
64
-id :coder-darwin
60
65
dir :cmd/coder
61
66
flags :[-tags=embed]
62
- ldflags :
63
- ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
67
+ ldflags :["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
64
68
env :[CGO_ENABLED=0]
65
69
goos :[darwin]
66
70
goarch :[amd64, arm64]
67
71
hooks :
68
72
# This signs the binary that will be located inside the zip.
69
73
# MacOS requires the binary to be signed for notarization.
70
- #
74
+ #
71
75
# If it doesn't successfully sign, the zip sign step will error.
72
76
post :|
73
77
sh -c 'codesign -s {{.Env.AC_APPLICATION_IDENTITY}} -f -v --timestamp --options runtime {{.Path}} || true'
@@ -99,6 +103,54 @@ nfpms:
99
103
-src :coder.service
100
104
dst :/usr/lib/systemd/system/coder.service
101
105
106
+ dockers :
107
+ -image_templates :["ghcr.io/coder/coder:{{ .Tag }}-amd64"]
108
+ id :coder-linux
109
+ dockerfile :Dockerfile
110
+ use :buildx
111
+ build_flag_templates :
112
+ ---platform=linux/amd64
113
+ ---label=org.opencontainers.image.title=Coder
114
+ ---label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform.
115
+ ---label=org.opencontainers.image.url=https://github.com/coder/coder
116
+ ---label=org.opencontainers.image.source=https://github.com/coder/coder
117
+ ---label=org.opencontainers.image.version={{ .Version }}
118
+ ---label=org.opencontainers.image.revision={{ .FullCommit }}
119
+ ---label=org.opencontainers.image.licenses=AGPL-3.0
120
+ -image_templates :["ghcr.io/coder/coder:{{ .Tag }}-arm64"]
121
+ goarch :arm64
122
+ dockerfile :Dockerfile
123
+ use :buildx
124
+ build_flag_templates :
125
+ ---platform=linux/arm64/v8
126
+ ---label=org.opencontainers.image.title=coder
127
+ ---label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform.
128
+ ---label=org.opencontainers.image.url=https://github.com/coder/coder
129
+ ---label=org.opencontainers.image.source=https://github.com/coder/coder
130
+ ---label=org.opencontainers.image.version={{ .Tag }}
131
+ ---label=org.opencontainers.image.revision={{ .FullCommit }}
132
+ ---label=org.opencontainers.image.licenses=AGPL-3.0
133
+ -image_templates :["ghcr.io/coder/coder:{{ .Tag }}-armv7"]
134
+ goarch :arm
135
+ goarm :" 7"
136
+ dockerfile :Dockerfile
137
+ use :buildx
138
+ build_flag_templates :
139
+ ---platform=linux/arm/v7
140
+ ---label=org.opencontainers.image.title=Coder
141
+ ---label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform.
142
+ ---label=org.opencontainers.image.url=https://github.com/coder/coder
143
+ ---label=org.opencontainers.image.source=https://github.com/coder/coder
144
+ ---label=org.opencontainers.image.version={{ .Tag }}
145
+ ---label=org.opencontainers.image.revision={{ .FullCommit }}
146
+ ---label=org.opencontainers.image.licenses=AGPL-3.0
147
+ docker_manifests :
148
+ -name_template :ghcr.io/coder/coder:{{ .Tag }}
149
+ image_templates :
150
+ -ghcr.io/coder/coder:{{ .Tag }}-amd64
151
+ -ghcr.io/coder/coder:{{ .Tag }}-arm64
152
+ -ghcr.io/coder/coder:{{ .Tag }}-armv7
153
+
102
154
release :
103
155
ids :[coder-linux, coder-darwin, coder-windows, packages]
104
156