Skip to content

Commit 50ff192

Browse files
committed
Merge remote-tracking branch 'origin/main' into pb-improvements
2 parents 4605fd0 + 50ad4a8 commit 50ff192

File tree

385 files changed

+14833
-4496
lines changed

Some content is hidden

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

385 files changed

+14833
-4496
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
33

44
ENV EDITOR=vim
55

6-
RUN apt-get update && apt-get upgrade
6+
RUN apt-get update && apt-get upgrade --yes
77

88
RUN apt-get install --yes \
99
ca-certificates \

.github/workflows/coder.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Checkout
3535
uses: actions/checkout@v2
3636
- name: typos-action
37-
uses: crate-ci/typos@v1.12.8
37+
uses: crate-ci/typos@v1.12.12
3838
with:
3939
config: .github/workflows/typos.toml
4040
- name: Fix Helper
@@ -89,14 +89,14 @@ jobs:
8989
style-lint-golangci:
9090
name: style/lint/golangci
9191
timeout-minutes: 5
92-
runs-on: ubuntu-latest
92+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
9393
steps:
9494
- uses: actions/checkout@v3
9595
- uses: actions/setup-go@v3
9696
with:
9797
go-version: "~1.19"
9898
- name: golangci-lint
99-
uses: golangci/golangci-lint-action@v3.2.0
99+
uses: golangci/golangci-lint-action@v3.3.0
100100
with:
101101
version: v1.48.0
102102

@@ -171,7 +171,7 @@ jobs:
171171
gen:
172172
name: "style/gen"
173173
timeout-minutes: 8
174-
runs-on: ubuntu-latest
174+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
175175
needs: changes
176176
if: needs.changes.outputs.docs-only == 'false'
177177
steps:
@@ -276,7 +276,7 @@ jobs:
276276
277277
test-go:
278278
name: "test/go"
279-
runs-on: ${{ matrix.os }}
279+
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || matrix.os }}
280280
timeout-minutes: 20
281281
strategy:
282282
matrix:
@@ -356,7 +356,7 @@ jobs:
356356

357357
test-go-postgres:
358358
name: "test/go/postgres"
359-
runs-on: ubuntu-latest
359+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
360360
# This timeout must be greater than the timeout set by `go test` in
361361
# `make test-postgres` to ensure we receive a trace of running
362362
# goroutines. Setting this to the timeout +5m should work quite well
@@ -417,7 +417,7 @@ jobs:
417417

418418
deploy:
419419
name: "deploy"
420-
runs-on: ubuntu-latest
420+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
421421
timeout-minutes: 30
422422
needs: changes
423423
if: |

.github/workflows/dogfood.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: Get branch name
1919
id: branch-name
20-
uses: tj-actions/branch-names@v6.1
20+
uses: tj-actions/branch-names@v6.2
2121

2222
- name: "Branch name to Docker tag name"
2323
id: docker-tag-name

.github/workflows/release.yaml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ permissions:
2020
contents: write
2121
# Necessary to push docker images to ghcr.io.
2222
packages: write
23+
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
24+
id-token: write
2325

2426
env:
2527
CODER_RELEASE: ${{ github.event.inputs.snapshot && 'false' || 'true' }}
2628

2729
jobs:
2830
release:
29-
runs-on: ubuntu-latest
31+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
3032
env:
3133
# Necessary for Docker manifest
3234
DOCKER_CLI_EXPERIMENTAL: "enabled"
@@ -65,13 +67,14 @@ jobs:
6567
restore-keys: |
6668
js-${{ runner.os }}-
6769
70+
- name: Install nsis and zstd
71+
run: sudo apt-get install -y nsis zstd
72+
6873
- name: Install nfpm
6974
run: |
7075
set -euo pipefail
7176
wget -O /tmp/nfpm.deb https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_amd64.deb
7277
sudo dpkg -i /tmp/nfpm.deb
73-
- name: Install zstd
74-
run: sudo apt-get install -y zstd
7578
7679
- name: Install rcodesign
7780
run: |
@@ -107,6 +110,7 @@ jobs:
107110
make -j \
108111
build/coder_"$version"_linux_{amd64,armv7,arm64}.{tar.gz,apk,deb,rpm} \
109112
build/coder_"$version"_{darwin,windows}_{amd64,arm64}.zip \
113+
build/coder_"$version"_windows_amd64_installer.exe \
110114
build/coder_helm_"$version".tgz
111115
env:
112116
CODER_SIGN_DARWIN: "1"
@@ -155,6 +159,7 @@ jobs:
155159
run: |
156160
./scripts/publish_release.sh \
157161
${{ (github.event.inputs.dry_run || github.event.inputs.snapshot) && '--dry-run' }} \
162+
./build/*_installer.exe \
158163
./build/*.zip \
159164
./build/*.tar.gz \
160165
./build/*.tgz \
@@ -164,6 +169,26 @@ jobs:
164169
env:
165170
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166171

172+
- name: Authenticate to Google Cloud
173+
uses: google-github-actions/auth@v0
174+
with:
175+
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
176+
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
177+
178+
- name: Setup GCloud SDK
179+
uses: 'google-github-actions/setup-gcloud@v0'
180+
181+
- name: Publish Helm Chart
182+
run: |
183+
set -euo pipefail
184+
version="$(./scripts/version.sh)"
185+
mkdir -p build/helm
186+
cp "build/coder_helm_${version}.tgz" build/helm
187+
gsutil cp gs://helm.coder.com/v2/index.yaml build/helm/index.yaml
188+
helm repo index build/helm --url https://helm.coder.com/v2 --merge build/helm/index.yaml
189+
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/coder_helm_${version}.tgz gs://helm.coder.com/v2
190+
gsutil -h "Cache-Control:no-cache,max-age=0" cp build/helm/index.yaml gs://helm.coder.com/v2
191+
167192
- name: Upload artifacts to actions (if dry-run or snapshot)
168193
if: ${{ github.event.inputs.dry_run || github.event.inputs.snapshot }}
169194
uses: actions/upload-artifact@v2

.github/workflows/typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MacOS = "macOS"
77
[default.extend-words]
88
# do as sudo replacement
99
doas = "doas"
10+
darcula = "darcula"
1011

1112
[files]
1213
extend-exclude = [

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ gotests.coverage
1818
.gitpod.yml
1919
.DS_Store
2020

21+
# Make target for updating golden files.
22+
cli/testdata/.gen-golden
23+
2124
# Front-end ignore
2225
.next/
2326
site/.eslintcache

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"cSpell.words": [
3+
"afero",
34
"apps",
5+
"ASKPASS",
46
"awsidentity",
57
"bodyclose",
68
"buildinfo",
@@ -19,16 +21,20 @@
1921
"derphttp",
2022
"derpmap",
2123
"devel",
24+
"devtunnel",
2225
"dflags",
2326
"drpc",
2427
"drpcconn",
2528
"drpcmux",
2629
"drpcserver",
2730
"Dsts",
31+
"embeddedpostgres",
2832
"enablements",
33+
"errgroup",
2934
"eventsourcemock",
3035
"fatih",
3136
"Formik",
37+
"gitauth",
3238
"gitsshkey",
3339
"goarch",
3440
"gographviz",
@@ -78,6 +84,7 @@
7884
"parameterscopeid",
7985
"pqtype",
8086
"prometheusmetrics",
87+
"promhttp",
8188
"promptui",
8289
"protobuf",
8390
"provisionerd",

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ $(CODER_ALL_PACKAGES): $(CODER_PACKAGE_DEPS)
252252
--output "$@" \
253253
"build/coder_$(VERSION)_$${os}_$${arch}"
254254

255+
# This task builds a Windows amd64 installer. Depends on makensis.
256+
build/coder_$(VERSION)_windows_amd64_installer.exe: build/coder_$(VERSION)_windows_amd64.exe
257+
./scripts/build_windows_installer.sh \
258+
--version "$(VERSION)" \
259+
--output "$@" \
260+
"$<"
261+
255262
# Redirect from version-less Docker image targets to the versioned ones.
256263
#
257264
# Called like this:
@@ -436,6 +443,15 @@ site/src/api/typesGenerated.ts: scripts/apitypings/main.go $(shell find codersdk
436443
cd site
437444
yarn run format:types
438445

446+
update-golden-files: cli/testdata/.gen-golden
447+
.PHONY: update-golden-files
448+
449+
cli/testdata/.gen-golden: $(wildcard cli/testdata/*.golden) \
450+
$(shell find . -not -path './vendor/*' -type f -name '*.go')
451+
452+
go test ./cli -run=TestCommandHelp -update
453+
touch "$@"
454+
439455
test: test-clean
440456
gotestsum -- -v -short ./...
441457
.PHONY: test

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ Coder creates remote development machines so your team can develop from anywhere
3232
> **Note**:
3333
> Coder is in a beta state. [Report issues here](https://github.com/coder/coder/issues/new).
3434
35-
The easiest way to install Coder is to use our [install script](https://github.com/coder/coder/blob/main/install.sh) for Linux and macOS.
35+
The easiest way to install Coder is to use our
36+
[install script](https://github.com/coder/coder/blob/main/install.sh) for Linux
37+
and macOS. For Windows, use the latest `..._installer.exe` file from GitHub
38+
Releases.
3639

3740
To install, run:
3841

0 commit comments

Comments
 (0)