Commit Graph

83 Commits

Author SHA1 Message Date
9ab437d6e2 feat: Add serving applications on subdomains and port-based proxying (#3753)
Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-09-14 03:31:33 +10:00
21e8fb243b fix: Allow develop.sh to host docker workspaces (#3802) 2022-09-13 09:21:05 -04:00
5e04a2f800 chore: Remove DataDog test reporting (#3958)
It was costing a lot of money, and it wasn't being used very much.
2022-09-08 14:29:30 +00:00
6a3876d6df chore: hide template check 404 error from develop.sh (#3942) 2022-09-08 15:22:08 +10:00
a79e34c0c7 chore: build releases on a single Linux runner (switch to rcodesign) (#3890)
* chore: build, sign and notarize darwin binaries on linux

* chore: download rcodesign during release

* chore: change nfpm install to be a download instead of compile

* chore: delete apple cert secrets after build

* fix: fix dependencies in archive.sh and build_go.sh

* chore: reduce output from rcodesign
2022-09-07 18:56:46 +00:00
819622182b chore: parallel makefile attempt 3 (#3926)
* Revert "chore: Revert parallel Makefile builds (#3918)"

This reverts commit b077f71015.

* fix: fix release workflow with parallel makefile

* fix: mark generated files as fresh during releases
2022-09-08 02:40:17 +10:00
b077f71015 chore: Revert parallel Makefile builds (#3918)
This was breaking the release process. Namely it was running
the `gen` targets due to the dependency tree, which was failing
on macOS and Linux runners. This revert can be reverted once
we fix that up.
2022-09-07 01:56:51 +00:00
1b6f9e54a3 fix: fix ERRPIPE in scripts/lib.sh (#3908) 2022-09-07 04:42:45 +10:00
419d701927 chore: parallel builds with Makefile (#3854)
* Revert "revert: Makefile buff-ification (#3700) (#3848)"

This reverts commit e490bdd531.

* fix: fix slim targets in makefile

* fix: don't clobber slim binaries, make sure they're in the correct location
2022-09-06 17:27:06 +00:00
e490bdd531 revert: Makefile buff-ification (#3700) (#3848)
This caused the following issues:
- Slim binaries weren't being updated.
- The coder.tar.ztd was misplaced.
- There is no coder.sha1 file with proper filenames.

This should be reintroduced in a future change with those fixes.
2022-09-02 14:46:58 -05:00
e1a4f3a16b Makefile buff-ification (#3700)
Remove old go_build_matrix and go_build_slim scripts in favor of full makefile-ification.
2022-09-02 12:58:23 +00:00
05f932b37e refactor(scripts): remove -P from ln calls (#3740) 2022-08-29 15:05:08 -07:00
78a24941fe feat: Add codersdk.NullTime, change workspace build deadline (#3552)
Fixes #2015

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-08-25 19:10:42 +03:00
b101a6f3f4 POST license API endpoint (#3570)
* POST license API

Signed-off-by: Spike Curtis <spike@coder.com>

* Support interface{} types in generated Typescript

Signed-off-by: Spike Curtis <spike@coder.com>

* Disable linting on empty interface any

Signed-off-by: Spike Curtis <spike@coder.com>

* Code review updates

Signed-off-by: Spike Curtis <spike@coder.com>

* Enforce unique licenses

Signed-off-by: Spike Curtis <spike@coder.com>

* Renames from code review

Signed-off-by: Spike Curtis <spike@coder.com>

* Code review renames and comments

Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-22 15:02:50 -07:00
369a9fb535 fix: add writeable home dir to docker image (#3603) 2022-08-22 19:43:13 +10:00
b0fe9bcdd1 chore: Upgrade to Go 1.19 (#3617)
This is required as part of #3505.
2022-08-21 22:32:53 +00:00
690e6c6585 Check AGPL code doesn't import enterprise (#3602)
* Check AGPL code doesn't import enterprise

Signed-off-by: Spike Curtis <spike@coder.com>

* use error/log instead of echo/exit

Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-19 17:49:08 +00:00
5c898d0c83 Fix archive.sh for LICENSE files (#3535)
Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-17 10:27:52 -07:00
5817c6ac7f Build enterprise coder binary by default (#3517)
* Build enterprise coder binary by default

Signed-off-by: Spike Curtis <spike@coder.com>

* Add --agpl to develop.sh

Signed-off-by: Spike Curtis <spike@coder.com>

* Add --agpl flag to archive.sh

Signed-off-by: Spike Curtis <spike@coder.com>

* shell format

Signed-off-by: Spike Curtis <spike@coder.com>

* Move AGPL back to LICENSE, explain enterprise license is forthcoming

Signed-off-by: Spike Curtis <spike@coder.com>

Signed-off-by: Spike Curtis <spike@coder.com>
2022-08-17 09:02:25 -07:00
9c12b4ed8e chore: Add nix shell for simple development setup (#3399)
* chore: Add nix shell for simple development setup

This enables contributors using Nix to set up their environment with ease.

* improve nix style, flake output schema

* fix error message

* Update scripts/build_go_slim.sh

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>

* Update scripts/build_go_slim.sh

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>

* Add UTC default for timezone and remove unnecessary goreleaser dependency

* Skip TZ test if localtime does not exist

Co-authored-by: Charlie Moog <moogcharlie@gmail.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-08-08 15:49:12 +00:00
01fe5e668e chore: add testutil.Eventually and friends (#3389)
This PR adds a `testutil` function aimed to replace `require.Eventually`.

Before:
```go
require.Eventually(t, func() bool { ... }, testutil.WaitShort, testutil.IntervalFast)
```

After:
```go
require.True(t, testutil.EventuallyShort(t, func(ctx context.Context) bool { ... }))

// or the full incantation if you need more control
ctx, cancel := context.WithTimeout(ctx.Background(), testutil.WaitLong)
require.True(t, testutil.Eventually(t, ctx, func(ctx context.Context) bool { ... }, testutil.IntervalSlow))
```

Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-08-05 16:34:44 +01:00
66a5b0f7bc fix: don't use adduser and addgroup for docker images (#3344)
* fix: don't use adduser and addgroup for docker images

* Revert "fix: Remove alternative image architectures until we virtualize (#3336)"

This reverts commit 00c5116a2e.
2022-08-01 19:28:38 +00:00
4730c589fe chore: Use standardized test timeouts and delays (#3291) 2022-08-01 15:45:05 +03:00
6230d5512e chore: Remove line numbers from auto-gen typescript (#3258)
* chore: Remove line numbers from auto-gen typescript

The line numbers are just extra noise that change when things shift
around. They are not required and usually make CI fail when you
forget to run 'make gen'.
2022-07-27 21:36:15 +00:00
b19cf701c5 feat: change docker to use "coder" user and add basic Helm chart (#2746) 2022-07-26 13:19:29 -05:00
2c0d57e8c0 fix: update reference to agent.dev in examples and docs (#3198)
* fix: update agent ID in example templates
* fix: update agent ID in dogfood template
* chore: update default agent ID in documentation
* fix: develop.sh: start FE after template is created; leave template dir around if template creation fails
2022-07-26 14:09:09 +01:00
51dd1fde3b fix: Remove use of require in require.Eventually in tests (#3110)
* fix: Remove use of `require` in `require.Eventually` in tests

Because require uses `t.FailNow()` and `require.Eventually` runs the
function in a goroutine, which is not allowed.

* feat: Add ruleguard for require.Eventually

Co-authored-by: Cian Johnston <cian@coder.com>
2022-07-22 20:02:49 +03:00
0f5f30b6f6 fix: make agent scripts easier to troubleshoot (#2922)
- Adds distinct exit statuses to the bootstrap scripts
- Makes the bootstrap scripts loop forever trying to download the coder agent
- Surfaces and logs the status codes returned by the download tool
2022-07-13 10:17:40 +01:00
8d8c1a1927 develop.sh: add missing embed tag (#2885) 2022-07-11 12:20:54 +01:00
0dbfd265fb chore: clean up scripts for internal godoc site that's no longer used (#2770) 2022-07-01 10:55:05 -05:00
e14953461c fix: develop.sh: do not clobber existing login, pre-build coder binary for speed (#2750) 2022-07-01 11:09:19 +01:00
cb2d1f488a fix: ci uses a migrated DB template (#2696)
Signed-off-by: Spike Curtis <spike@coder.com>
2022-06-28 14:42:19 -07:00
576aef40f2 chore: Add linter rule to catch missing return after http writes (#2702) 2022-06-28 14:13:37 -05:00
6429dfee1f test: Use a template to prevent migrations from running for every test (#2462)
* test: Use a template to prevent migrations from running for every test

* Create a single makefile target

* Fix built-in race

* Extend timeout of built-in PostgreSQL fetch
2022-06-27 17:07:39 +00:00
bbbd5241c3 develop.sh: attempt to create a Docker template automatically (#2627)
This commit makes the following changes:

- Adds two variables docker_host and docker_arch to the example docker-code-server template
- Adds an example params.yaml to docker-code-server and updates the README.md to reference these parameters
- scripts/develop.sh will now attempt to create a template using docker-code-server with the appropriate parameters for the environment
- Updated Lima example to make use of the template parameters for docker-code-server


Additional drive-bys:

- webpack.dev.ts references CODER_HOST and not CODERV2_HOST; updated develop.sh accordingly
- develop.sh should now terminate child processes upon error.
2022-06-27 09:59:08 +01:00
ac557e02b8 clean site/out and enforce make bin (#2604) 2022-06-23 15:16:27 +01:00
69b7eed7ed feat: Check decompressed coder-slim binaries via SHA1 (#2556) 2022-06-22 21:33:23 +03:00
a0c8e70d1b scripts/develop.sh: remove nc dependency (#2590) 2022-06-22 18:04:12 +00:00
c366725472 Revert changes to scripts/build_go_matrix.sh from 1778db2 (#2581) 2022-06-22 15:59:20 +00:00
1778db23cb fix: Use WebSockets to stream workspace build logs (#2569)
* fix: Use WebSockets to stream workspace build logs

This was using a streaming HTTP request before, which didn't work
on my version of Chrome. This method seemed less reliable and standard
than a WebSocket, so figured switching would be best.

* Update site/src/xServices/workspaceBuild/workspaceBuildXService.ts

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>

* Update site/src/pages/WorkspaceBuildPage/WorkspaceBuildPage.test.tsx

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>

* Update site/src/api/api.ts

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>

* Remove unused prop

Co-authored-by: Abhineet Jain <AbhineetJain@users.noreply.github.com>
2022-06-22 13:23:14 +00:00
dc7d6def8e improve develop.sh (#2572)
- Running make dev now prompts you to run ./scripts/develop.sh manually, as GNU make does not appear to pass SIGINT to subprocesses.
- Added checks to develop.sh to ensure that coderd is listening before running our initial setup steps
- Add some more troubleshooting/debugging output to develop.sh
2022-06-22 14:02:31 +01:00
e2785ada5e feat: Compress and extract slim binaries with zstd (#2533)
Fixes #2202

Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-06-21 19:53:36 +03:00
64f0473499 chore: Prefer [[ over [ in bash build scripts (#2543) 2022-06-21 19:51:32 +03:00
9bdaec6a21 fix: use armhf architecture in linux packages (#2514) 2022-06-20 06:12:38 +10:00
153ffc0ee9 fix: include architecture and version information in linux packages (#2511) 2022-06-19 18:56:07 +00:00
97348b1c9d fix: replace underscores with hyphens in slim binary name (#2509) 2022-06-19 18:15:20 +00:00
8d6faa3c1a fix: login before pushing docker images in release pipeline (#2496) 2022-06-19 13:12:09 +10:00
4b3608b628 fix: run git fetch --tags --force during release (#2495) 2022-06-19 10:39:01 +10:00
167ab281e4 fix: fix ERRPIPE in build scripts, fix deploy (#2492) 2022-06-18 21:47:37 +00:00
075e891f28 Remove goreleaser in favor of build scripts (#2143) 2022-06-19 05:47:10 +10:00