Skip to content

Commit 2e26ef4

Browse files
committed
merged in main
2 parents b78f0b5 + 4b82509 commit 2e26ef4

File tree

246 files changed

+6614
-2832
lines changed

Some content is hidden

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

246 files changed

+6614
-2832
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- rm -f site/out/bin/coder*
5+
6+
archives:
7+
- id: coder-darwin
8+
builds: [coder-darwin]
9+
format: zip
10+
11+
builds:
12+
- id: coder-slim
13+
dir: cmd/coder
14+
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
15+
env: [CGO_ENABLED=0]
16+
goos: [darwin, linux, windows]
17+
goarch: [amd64, arm, arm64]
18+
goarm: ["7"]
19+
# Only build arm 7 for Linux
20+
ignore:
21+
- goos: windows
22+
goarm: "7"
23+
- goos: darwin
24+
goarm: "7"
25+
hooks:
26+
# The "trimprefix" appends ".exe" on Windows.
27+
post: |
28+
cp {{.Path}} site/out/bin/coder-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ trimprefix .Name "coder" }}
29+
30+
- id: coder-darwin
31+
dir: cmd/coder
32+
flags: [-tags=embed]
33+
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
34+
env: [CGO_ENABLED=0]
35+
goos: [darwin]
36+
goarch: [amd64, arm64]
37+
hooks:
38+
# This signs the binary that will be located inside the zip. MacOS
39+
# requires the binary to be signed for notarization.
40+
post: |
41+
sh -c 'codesign -s {{.Env.AC_APPLICATION_IDENTITY}} -f -v --timestamp --options runtime {{.Path}}'
42+
43+
env:
44+
# Apple identity for signing!
45+
- AC_APPLICATION_IDENTITY=BDB050EB749EDD6A80C6F119BF1382ECA119CCCC
46+
47+
signs:
48+
- ids: [coder-darwin]
49+
artifacts: archive
50+
cmd: ./scripts/sign_macos.sh
51+
args: ["${artifact}"]
52+
output: true
53+
54+
release:
55+
ids: [coder-darwin]
56+
57+
snapshot:
58+
name_template: "{{ .Version }}-devel+{{ .ShortCommit }}"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- rm -f site/out/bin/coder*
5+
6+
archives:
7+
- id: coder-linux
8+
builds: [coder-linux]
9+
format: tar.gz
10+
11+
- id: coder-windows
12+
builds: [coder-windows]
13+
format: zip
14+
15+
builds:
16+
- id: coder-slim
17+
dir: cmd/coder
18+
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
19+
env: [CGO_ENABLED=0]
20+
goos: [darwin, linux, windows]
21+
goarch: [amd64, arm, arm64]
22+
goarm: ["7"]
23+
# Only build arm 7 for Linux
24+
ignore:
25+
- goos: windows
26+
goarm: "7"
27+
- goos: darwin
28+
goarm: "7"
29+
hooks:
30+
# The "trimprefix" appends ".exe" on Windows.
31+
post: |
32+
cp {{.Path}} site/out/bin/coder-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ trimprefix .Name "coder" }}
33+
34+
- id: coder-linux
35+
dir: cmd/coder
36+
flags: [-tags=embed]
37+
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
38+
env: [CGO_ENABLED=0]
39+
goos: [linux]
40+
goarch: [amd64, arm, arm64]
41+
goarm: ["7"]
42+
43+
- id: coder-windows
44+
dir: cmd/coder
45+
flags: [-tags=embed]
46+
ldflags: ["-s -w -X github.com/coder/coder/buildinfo.tag={{ .Version }}"]
47+
env: [CGO_ENABLED=0]
48+
goos: [windows]
49+
goarch: [amd64, arm64]
50+
51+
release:
52+
ids: [coder-windows, coder-linux]
53+
54+
snapshot:
55+
name_template: "{{ .Version }}-devel+{{ .ShortCommit }}"

.github/.goreleaser-release.yaml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# This goreleaser config file requires GoReleaser Pro as it uses the prebuilt
2+
# builder type.
3+
4+
archives:
5+
- id: coder-linux
6+
builds: [release-prebuilt-linux]
7+
format: tar.gz
8+
9+
builds:
10+
- id: release-prebuilt-linux
11+
builder: prebuilt
12+
goos: [linux]
13+
goarch: [amd64, arm, arm64]
14+
goarm: ["7"]
15+
prebuilt:
16+
path: artifacts/coder-linux_{{.Os}}_{{.Arch}}{{ with .Arm }}_{{ . }}{{ end }}/coder
17+
18+
# This section is also contained in .goreleaser.yaml.
19+
nfpms:
20+
- id: packages
21+
vendor: Coder
22+
homepage: https://coder.com
23+
maintainer: Coder <support@coder.com>
24+
description: |
25+
Provision development environments with infrastructure with code
26+
formats:
27+
- apk
28+
- deb
29+
- rpm
30+
suggests:
31+
- postgresql
32+
builds:
33+
- release-prebuilt-linux
34+
bindir: /usr/bin
35+
contents:
36+
- src: coder.env
37+
dst: /etc/coder.d/coder.env
38+
type: "config|noreplace"
39+
- src: coder.service
40+
dst: /usr/lib/systemd/system/coder.service
41+
42+
# Image templates are empty on snapshots to avoid lengthy builds for
43+
# development.
44+
dockers:
45+
- image_templates: ["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-amd64{{ end }}"]
46+
id: release-prebuilt-linux
47+
dockerfile: Dockerfile
48+
use: buildx
49+
build_flag_templates:
50+
- --platform=linux/amd64
51+
- --label=org.opencontainers.image.title=Coder
52+
- --label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform.
53+
- --label=org.opencontainers.image.url=https://github.com/coder/coder
54+
- --label=org.opencontainers.image.source=https://github.com/coder/coder
55+
- --label=org.opencontainers.image.version={{ .Version }}
56+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
57+
- --label=org.opencontainers.image.licenses=AGPL-3.0
58+
- image_templates: ["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-arm64{{ end }}"]
59+
goarch: arm64
60+
dockerfile: Dockerfile
61+
use: buildx
62+
build_flag_templates:
63+
- --platform=linux/arm64/v8
64+
- --label=org.opencontainers.image.title=coder
65+
- --label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform.
66+
- --label=org.opencontainers.image.url=https://github.com/coder/coder
67+
- --label=org.opencontainers.image.source=https://github.com/coder/coder
68+
- --label=org.opencontainers.image.version={{ .Tag }}
69+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
70+
- --label=org.opencontainers.image.licenses=AGPL-3.0
71+
- image_templates: ["{{ if not .IsSnapshot }}ghcr.io/coder/coder:{{ .Tag }}-armv7{{ end }}"]
72+
goarch: arm
73+
goarm: "7"
74+
dockerfile: Dockerfile
75+
use: buildx
76+
build_flag_templates:
77+
- --platform=linux/arm/v7
78+
- --label=org.opencontainers.image.title=Coder
79+
- --label=org.opencontainers.image.description=A tool for provisioning self-hosted development environments with Terraform.
80+
- --label=org.opencontainers.image.url=https://github.com/coder/coder
81+
- --label=org.opencontainers.image.source=https://github.com/coder/coder
82+
- --label=org.opencontainers.image.version={{ .Tag }}
83+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
84+
- --label=org.opencontainers.image.licenses=AGPL-3.0
85+
86+
docker_manifests:
87+
- name_template: ghcr.io/coder/coder:{{ .Tag }}
88+
image_templates:
89+
- ghcr.io/coder/coder:{{ .Tag }}-amd64
90+
- ghcr.io/coder/coder:{{ .Tag }}-arm64
91+
- ghcr.io/coder/coder:{{ .Tag }}-armv7
92+
93+
release:
94+
ids: [release-prebuilt-linux, packages]
95+
footer: |
96+
## Container Image
97+
- `docker pull ghcr.io/coder/coder:{{ .Tag }}`
98+
# All non-Linux files should just be used as is. We have to import the Linux
99+
# builds so that the docker images get built and package creation works.
100+
extra_files:
101+
- glob: ./artifacts/coder_*_darwin_*.zip
102+
- glob: ./artifacts/coder_*_windows_*.zip
103+
104+
snapshot:
105+
name_template: "{{ .Version }}-devel+{{ .ShortCommit }}"

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/doc.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/codecov.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
codecov:
22
require_ci_to_pass: false
3+
notify:
4+
after_n_builds: 5
35

46
comment: false
57

@@ -19,7 +21,7 @@ coverage:
1921
ignore:
2022
# This is generated code.
2123
- coderd/database/models.go
22-
- coderd/database/query.sql.go
24+
- coderd/database/queries.sql.go
2325
- coderd/database/databasefake
2426
# These are generated or don't require tests.
2527
- cmd

.github/dependabot.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ updates:
66
interval: "weekly"
77
time: "06:00"
88
timezone: "America/Chicago"
9+
labels: []
910
commit-message:
1011
prefix: "chore"
1112
ignore:
@@ -32,9 +33,7 @@ updates:
3233
timezone: "America/Chicago"
3334
commit-message:
3435
prefix: "chore"
35-
labels:
36-
- "dependencies"
37-
- "go"
36+
labels: []
3837

3938
- package-ecosystem: "npm"
4039
directory: "/site/"
@@ -44,9 +43,7 @@ updates:
4443
timezone: "America/Chicago"
4544
commit-message:
4645
prefix: "chore"
47-
labels:
48-
- "dependencies"
49-
- "typescript/js"
46+
labels: []
5047
ignore:
5148
# Ignore major updates to Node.js types, because they need to
5249
# correspond to the Node.js engine version
@@ -62,9 +59,7 @@ updates:
6259
timezone: "America/Chicago"
6360
commit-message:
6461
prefix: "chore"
65-
labels:
66-
- "dependencies"
67-
- "terraform"
62+
labels: []
6863
ignore:
6964
# We likely want to update this ourselves.
7065
- dependency-name: "coder/coder"

0 commit comments

Comments
 (0)