Skip to content

Commit 3116964

Browse files
committed
Merge remote-tracking branch 'origin/main' into stevenmasley/csrf
2 parents 0aae08a + 21e8fb2 commit 3116964

File tree

404 files changed

+15063
-7265
lines changed

Some content is hidden

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

404 files changed

+15063
-7265
lines changed

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
site/ @coder/frontend
2-
docs/ @ammario
2+
docs/ @coder/docs
3+
README.md @coder/docs
4+
ADOPTERS.md @coder/docs

.github/pull_request_template.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
<!-- Help reviewers by listing the subtasks in this PR
2-
3-
Here's an example:
4-
5-
This PR adds a new feature to the CLI.
6-
7-
## Subtasks
8-
9-
- [x] added a test for feature
10-
11-
Fixes #345
12-
1+
<!--
2+
Check if your change requires documentation edits before merging: https://coder.com/docs/coder. Make edits in `docs/`.
133
-->

.github/workflows/coder.yaml

Lines changed: 22 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ jobs:
193193
- name: Install node_modules
194194
run: ./scripts/yarn_install.sh
195195

196-
- name: Install Protoc
197-
uses: arduino/setup-protoc@v1
198-
with:
199-
version: "3.20.0"
200196
- uses: actions/setup-go@v3
201197
with:
202198
go-version: "~1.19"
@@ -229,6 +225,18 @@ jobs:
229225
- name: Install goimports
230226
run: go install golang.org/x/tools/cmd/goimports@latest
231227

228+
- name: Install Protoc
229+
run: |
230+
# protoc must be in lockstep with our dogfood Dockerfile
231+
# or the version in the comments will differ.
232+
set -x
233+
cd dogfood
234+
DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
235+
protoc_path=/usr/local/bin/protoc
236+
docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
237+
chmod +x $protoc_path
238+
protoc --version
239+
232240
- name: make gen
233241
run: "make --output-sync -j -B gen"
234242

@@ -336,15 +344,6 @@ jobs:
336344
fi
337345
gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=$test_timeout -short -failfast $COVERAGE_FLAGS
338346
339-
- name: Upload DataDog Trace
340-
if: github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
341-
env:
342-
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
343-
DD_DATABASE: fake
344-
DD_CATEGORY: unit
345-
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
346-
run: go run scripts/datadog-cireport/main.go gotests.xml
347-
348347
- uses: codecov/codecov-action@v3
349348
# This action has a tendency to error out unexpectedly, it has
350349
# the `fail_ci_if_error` option that defaults to `false`, but
@@ -406,14 +405,6 @@ jobs:
406405
- name: Test with PostgreSQL Database
407406
run: make test-postgres
408407

409-
- name: Upload DataDog Trace
410-
if: always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
411-
env:
412-
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
413-
DD_DATABASE: postgresql
414-
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
415-
run: go run scripts/datadog-cireport/main.go gotests.xml
416-
417408
- uses: codecov/codecov-action@v3
418409
# This action has a tendency to error out unexpectedly, it has
419410
# the `fail_ci_if_error` option that defaults to `false`, but
@@ -484,41 +475,29 @@ jobs:
484475
restore-keys: |
485476
js-${{ runner.os }}-
486477
478+
- name: Install goimports
479+
run: go install golang.org/x/tools/cmd/goimports@latest
487480
- name: Install nfpm
488481
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.16.0
489482

490483
- name: Install zstd
491484
run: sudo apt-get install -y zstd
492485

493-
- name: Build site
494-
run: make -B site/out/index.html
495-
496486
- name: Build Release
497487
run: |
498488
set -euo pipefail
499489
go mod download
500490
501-
mkdir -p ./dist
502-
# build slim binaries
503-
./scripts/build_go_slim.sh \
504-
--output ./dist/ \
505-
--compress 22 \
506-
linux:amd64,armv7,arm64 \
507-
windows:amd64,arm64 \
508-
darwin:amd64,arm64
509-
510-
# build linux amd64 packages
511-
./scripts/build_go_matrix.sh \
512-
--output ./dist/ \
513-
--package-linux \
514-
linux:amd64 \
515-
windows:amd64
491+
version="$(./scripts/version.sh)"
492+
make -j \
493+
build/coder_"$version"_windows_amd64.zip \
494+
build/coder_"$version"_linux_amd64.{tar.gz,deb}
516495
517496
- name: Install Release
518497
run: |
519498
gcloud config set project coder-dogfood
520499
gcloud config set compute/zone us-central1-a
521-
gcloud compute scp ./dist/coder_*_linux_amd64.deb coder:/tmp/coder.deb
500+
gcloud compute scp ./build/coder_*_linux_amd64.deb coder:/tmp/coder.deb
522501
gcloud compute ssh coder -- sudo dpkg -i --force-confdef /tmp/coder.deb
523502
gcloud compute ssh coder -- sudo systemctl daemon-reload
524503
@@ -529,12 +508,9 @@ jobs:
529508
with:
530509
name: coder
531510
path: |
532-
./dist/*.zip
533-
./dist/*.exe
534-
./dist/*.tar.gz
535-
./dist/*.apk
536-
./dist/*.deb
537-
./dist/*.rpm
511+
./build/*.zip
512+
./build/*.tar.gz
513+
./build/*.deb
538514
retention-days: 7
539515

540516
test-js:
@@ -555,11 +531,6 @@ jobs:
555531
restore-keys: |
556532
js-${{ runner.os }}-
557533
558-
# Go is required for uploading the test results to datadog
559-
- uses: actions/setup-go@v3
560-
with:
561-
go-version: "~1.19"
562-
563534
- uses: actions/setup-node@v3
564535
with:
565536
node-version: "14"
@@ -582,14 +553,6 @@ jobs:
582553
files: ./site/coverage/lcov.info
583554
flags: unittest-js
584555

585-
- name: Upload DataDog Trace
586-
if: always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
587-
env:
588-
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
589-
DD_CATEGORY: unit
590-
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
591-
run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml
592-
593556
test-e2e:
594557
name: "test/e2e/${{ matrix.os }}"
595558
needs:
@@ -613,7 +576,6 @@ jobs:
613576
.eslintcache
614577
key: js-${{ runner.os }}-e2e-${{ hashFiles('**/yarn.lock') }}
615578

616-
# Go is required for uploading the test results to datadog
617579
- uses: actions/setup-go@v3
618580
with:
619581
go-version: "~1.19"
@@ -669,13 +631,6 @@ jobs:
669631
path: ./site/test-results/**/*.webm
670632
retention:days: 7
671633

672-
- name: Upload DataDog Trace
673-
if: always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
674-
env:
675-
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
676-
DD_CATEGORY: e2e
677-
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
678-
run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml
679634
chromatic:
680635
# REMARK: this is only used to build storybook and deploy it to Chromatic.
681636
runs-on: ubuntu-latest

.github/workflows/dependabot.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Dependabot is annoying, but this makes it a bit less so.
2+
name: Auto Approve Dependabot
3+
4+
on: pull_request_target
5+
6+
jobs:
7+
auto-approve:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- uses: hmarr/auto-approve-action@v2
13+
if: github.actor == 'dependabot[bot]'

0 commit comments

Comments
 (0)