8000 Merge branch 'main' into bpmct/add-bpmct · coder/coder@78cd78d · GitHub
[go: up one dir, main page]

Skip to content

Commit 78cd78d

Browse files
authored
Merge branch 'main' into bpmct/add-bpmct
2 parents 8762b75 + 86cba4d commit 78cd78d

File tree

190 files changed

+4493
-1506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+4493
-1506
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Report a bug
44
title: "Bug: "
5-
labels: "bug :bug:"
5+
labels: ["bug :bug:", "needs grooming :razor:"]
66
---
77

88
## OS Information

.github/ISSUE_TEMPLATE/doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Documentation improvement
33
about: Suggest a documentation improvement
44
title: "Docs: "
5-
labels: "documentation :memo:"
5+
labels: ["documentation :memo:", "needs grooming :razor:"]
66
---
77

88
## What is your suggestion?

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Feature request
33
about: Suggest an idea to improve coder
44
title: "Feat: "
5-
labels: "new feature :sparkles:"
5+
labels: ["new feature :sparkles:", "needs grooming :razor:"]
66
---
77

88
## What is your suggestion?

.github/workflows/coder.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: golangci-lint
4343
uses: golangci/golangci-lint-action@v3.1.0
4444
with:
45-
version: v1.45.2
45+
version: v1.46.0
4646

4747
style-lint-typescript:
4848
name: "style/lint/typescript"

.github/workflows/release.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,32 @@ on:
33
push:
44
tags:
55
- "v*"
6+
workflow_dispatch:
7+
68
jobs:
79
goreleaser:
810
runs-on: macos-latest
11+
env:
12+
# Necessary for Docker manifest
13+
DOCKER_CLI_EXPERIMENTAL: "enabled"
914
steps:
15+
# Docker is not included on macos-latest
16+
- uses: docker-practice/actions-setup-docker@v1.0.8
17+
1018
- uses: actions/checkout@v3
1119
with:
1220
fetch-depth: 0
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v1
24+
25+
- name: Docker Login
26+
uses: docker/login-action@v1
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.repository_owner }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
1332
- uses: actions/setup-go@v3
1433
with:
1534
go-version: "~1.18"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ site/out/
3737
.terraform/
3838

3939
.vscode/*.log
40+
**/*.swp

.golangci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ linters-settings:
7777
# - sloppyReassign
7878
- sloppyTypeAssert
7979
- sortSlice
80-
# - sprintfQuotedString
80+
- sprintfQuotedString
8181
- sqlQuery
8282
# - stringConcatSimplify
8383
# - stringXbytes
@@ -105,6 +105,13 @@ linters-settings:
105105
failOn: all
106106
rules: rules.go
107107

108+
staticcheck:
109+
# https://staticcheck.io/docs/options#checks
110+
# We disable SA1019 because it gets angry about our usage of xerrors. We
111+
# intentionally xerrors because stack frame support didn't make it into the
112+
# stdlib port.
113+
checks: ["all", "-SA1019"]
114+
108115
goimports:
109116
local-prefixes: coder.com,cdr.dev,go.coder.com,github.com/cdr,github.com/coder
110117

@@ -235,7 +242,7 @@ linters:
235242
# without testing any exported functions. This is enabled to promote
236243
# decomposing a package before testing it's internals. A function caller
237244
# should be able to test most of the functionality from exported functions.
238-
#
245+
#
239246
# There are edge-cases to this rule, but they should be carefully considered
240247
# to avoid structural inconsistency.
241248
- testpackage

.goreleaser.yaml

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,46 +28,50 @@ before:
2828
builds:
2929
- id: coder-slim
3030
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 }}"]
3332
env: [CGO_ENABLED=0]
3433
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"
3642
hooks:
3743
# The "trimprefix" appends ".exe" on Windows.
3844
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" }}
4046
4147
- id: coder-linux
4248
dir: cmd/coder
4349
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 }}"]
4651
env: [CGO_ENABLED=0]
4752
goos: [linux]
48-
goarch: [amd64, arm64]
53+
goarch: [amd64, arm, arm64]
54+
goarm: ["7"]
4955

5056
- id: coder-windows
5157
dir: cmd/coder
5258
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 }}"]
5560
env: [CGO_ENABLED=0]
5661
goos: [windows]
5762
goarch: [amd64, arm64]
5863

5964
- id: coder-darwin
6065
dir: cmd/coder
6166
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 }}"]
6468
env: [CGO_ENABLED=0]
6569
goos: [darwin]
6670
goarch: [amd64, arm64]
6771
hooks:
6872
# This signs the binary that will be located inside the zip.
6973
# MacOS requires the binary to be signed for notarization.
70-
#
74+
#
7175
# If it doesn't successfully sign, the zip sign step will error.
7276
post: |
7377
sh -c 'codesign -s {{.Env.AC_APPLICATION_IDENTITY}} -f -v --timestamp --options runtime {{.Path}} || true'
@@ -99,6 +103,54 @@ nfpms:
99103
- src: coder.service
100104
dst: /usr/lib/systemd/system/coder.service
101105

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+
102154
release:
103155
ids: [coder-linux, coder-darwin, coder-windows, packages]
104156

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"emeraldwalk.runonsave",
88
"zxh404.vscode-proto3",
99
"redhat.vscode-yaml",
10-
"streetsidesoftware.code-spell-checker"
10+
"streetsidesoftware.code-spell-checker",
11+
"dbaeumer.vscode-eslint"
1112
]
1213
}

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM alpine
2+
3+
# Generated by goreleaser on `goreleaser release`
4+
ADD coder /opt/coder
5+
6+
ENTRYPOINT [ "/opt/coder", "server" ]

0 commit comments

Comments
 (0)
0