Commit Graph

249 Commits

Author SHA1 Message Date
renovate[bot] 79e96a99d3
chore(deps): update codecov/codecov-action action to v3 (#5305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-29 08:55:44 -07:00
renovate[bot] c99f4cef25
chore(deps): update azure/setup-helm action to v3 (#5302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-28 12:57:29 -07:00
Joe Previte 1296848afc
refactor: switch to codecov-uploader GitHub Action (#5303)
* refactor: switch to codecov-uploader GitHub Action

codecov deprecated their Node wrapper for uploading coverage reports.

This removes that and uses their new uploaded along with the v2 GitHub
Action they maintain.

* fix: update broken integration test
2022-06-28 10:04:35 -07:00
Joe Previte c51ff3bce1
refactor: move integration tests to Jest (#5275)
* feat: add installExtension integration test

This adds a new helper function called `runCodeServerCommand` along with
a test for `--install-extension`. We can use this approach for writing
integration tests (i.e. testing a real code-server build, CLI commands,
etc).

* refactor: s/ test:standalone with test:integration

This replaces our integration approach to use Jest instead of a single
bash script. By doing this, we will be able to easily maintain and add
to our integration test suite.

* refactor: filter unit tests

Now that our integration tests also use Jest, we need to update our unit
test script to ignore `test/integration`.

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* refactor: add SKIP_SUBMODULE_DEPS to postinstall

* fixup!: skip submod deps

* refactor: move runCodeServerCommand into sep. file

When Jest runs a test, it loads all the files and imports for that test.
This means you might be "requiring" code that's unrelated to your tests.

This leads to unexpected errors depending on where the code runs.

Moved this file to avoid GLIBC and other errors relaed to argon2 when
running integration tests in CI.

* fizup: formatting

* fizup: increase timeout

* refactor: use fixture in installExtension test

Instead of relying on a network to install an extension, we use a
fixture - vsix file in the repo. This is also faster.

* feat: add integration test for listExtensions

* chore: ignore integration fixtures

* fixup: formatting

* fixup: remove custom-hacks.css

* fixup: formatting

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/installExtension.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* fixup: contributing integration tests section

* fixup: update ci/readme

* fixup: use RELEASE_PATH in test-integration.sh

* refactor: unzip vsix for listExtensions

* refactor: use exec instead of spawn

* Update docs/CONTRIBUTING.md

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* Update test/integration/listExtensions.test.ts

Co-authored-by: Asher <ash@coder.com>

* refactor: use different default binary path

* fixup!: formatting

Co-authored-by: Asher <ash@coder.com>
2022-06-24 16:33:38 +00:00
renovate[bot] a879844c2d
chore(deps): update aquasecurity/trivy-action digest to 7b7aa26 (#5289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-22 20:05:22 +00:00
renovate[bot] f2693d366c
chore(deps): update minor dependency updates (#5276)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-06-22 16:26:20 +00:00
Joe Previte eb314ff727
chore: only download .deb in docker release (#5277)
* Update docker.yaml

* Update docker.yaml
2022-06-17 08:02:33 -07:00
renovate[bot] 113ad85b37
chore(deps): update minor dependency updates (#5244)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-15 13:29:52 -07:00
Joe Previte 744b301c7a
Update bug-report.yml (#5262) 2022-06-13 20:18:51 +00:00
Joe Previte ba990668a5
chore: update bug report template (#5261)
* chore: update bug report template

Add an additional checkbox to the bug report template

* Update .github/ISSUE_TEMPLATE/bug-report.yml
2022-06-13 12:51:30 -07:00
renovate[bot] 792e954937
chore(deps): update aquasecurity/trivy-action digest to df3fb7d (#5239)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-06 08:51:15 -07:00
Asher 5d47282ea5
fix: install nfpm straight from GitHub (#5214)
* fix: install nfpm straight from GitHub

install.goreleaser.com appears to no longer be available.

* Add -f to curl commands

This might have made it so we got the right error rather than erroring
on the envsubst step.
2022-05-20 12:39:54 -07:00
Devin Buhl 7a8d487729
chore: push code-server image to GHCR (#5187) 2022-05-10 16:11:06 -05:00
renovate[bot] 1788537cce
chore(deps): update minor dependency updates (#5181)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-10 21:01:13 +00:00
renovate[bot] 0155a12500
chore(deps): update docker/setup-qemu-action action to v2 (#5166)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-05-10 20:35:25 +00:00
renovate[bot] 53b5d41271
chore(deps): update docker/setup-buildx-action action to v2 (#5164)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-05-10 13:13:45 -07:00
renovate[bot] 55006ccb5a
chore(deps): update docker/login-action action to v2 (#5163)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-10 12:37:05 -07:00
Joe Previte 60dd8ab374
chore: configure git globally for brew publish (#5173) 2022-05-06 22:31:03 +00:00
Asher 6cf607eab9
fix: Docker push (#5175)
The action actually does not support wildcards but it does support * for
downloading all artifacts.
2022-05-06 16:57:22 -05:00
Joe Previte 7027ec7d60
chore: upgrade Code to 1.66 (#5135)
* chore: upgrade Code to 1.66

* docs: update docs for Code upgrades

* fixup!: docs

* chore: update vscode submodule

* chore: update integration patch

* chore: update node-version patch

* chore: update github-auth patch

They completely changed how auth is handled for GitHub in
https://github.com/microsoft/vscode/pull/145424 so our patch may not
work. Will need to test and revisit.

* refactor: remove postinstall patch

It appears they renamed postinstall.js to postinstall.mjs and removed
the use of `rimraf` which means our patch is no longer needed! 🎉

b0e8554cce

* chore: refresh local-storage patch

* chore: refresh service-worker patch

* chore: bulk refresh patches

* fixup!: docs formatting

* refactor: remove unused last-opened patch

* fixup!: formatting docs

* fixup!: formatting docs

* refactor: remove rsync postinstall

* Revert "refactor: remove rsync postinstall"

This reverts commit 8d6b613e9d.

* refactor: update postinstall.js to .mjs

* feat(patches): add parent-origin bypass

* docs(patches): add notes for testing store-socket

* docs(patches): update testing info for node-version

* refactor(patches): delete github-auth.diff patch

* docs(patches): add notes for testing connection-type

* fixup!: delete github-auth patch

* fixup!: update connection type testing

* docs(patches): add notes to insecure-notification.diff

* docs(patches): add nots for update-check.diff

* fixup!: remove comma in integration patch

* fix(e2e): disable workspace trust

* refactor: add --no-default-rc for yarn install

* feat(patches): remove yarnrc in presinstall

* fixup!: silly mistake

* docs: add note about KEEP_MODULES=1

* docs(patches): add testing notes for node-version

* refactor(patches): remove node-version

It appears this is no longer needed due to the `remote/package.json` now which
targets node rather than electron.

* fixup!: add cd ../.. to code upgrade instructions

* fixup!: add note to yarn --production flag

* fixup!: make parent-origin easier to upstream

* Revert "refactor(patches): delete github-auth.diff patch"

This reverts commit 31a354a343.

* Revert "fixup!: delete github-auth patch"

This reverts commit bdeb5212e8.

* Merge webview origin patch into webview patch

* Remove unused post-install patch

* Prevent builtin extensions from updating

* Refresh sourcemaps patch

* Update Node to v16

This matches the version in ./lib/vscode/remote/.yarnrc.

I changed the engine to exactly 16 since if you use any different
version it will just not work since the modules will have been built for
16 (due to the .yarnrc).

* Replace fs.rmdir with fs.rm

Node is showing a deprecation warning about it.

* Update github-auth patch

The local credentials provider is no longer used when there is a remote
so this code moved into the backend web credential provider.

* Prevent fs.rm from erroring about non-existent files

We were using fs.rmdir which presumably did not have the same behavior
in v14 (in v16 fs.rmdir also errors).

* Install Python 3 in CentOS CI container

Co-authored-by: Asher <ash@coder.com>
2022-05-04 21:58:49 +00:00
renovate[bot] fc75db6edc
chore(deps): update azure/setup-helm action to v2 (#5088)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-26 21:48:39 +00:00
renovate[bot] ed7bd2e65b
chore(deps): update github/codeql-action action to v2 (#5129)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-25 15:39:32 -07:00
renovate[bot] 7780a13cce
chore(deps): update aquasecurity/trivy-action digest to 2b30463 (#5098)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-19 11:37:47 -07:00
Joe Previte dea6a40ea8
chore: attempt to fix docker (#5106)
* chore: attempt to fix docker

* Update .github/workflows/docker.yaml

Co-authored-by: Asher <ash@coder.com>

* chore: add publish:docker to scripts

Co-authored-by: Asher <ash@coder.com>
2022-04-15 00:02:03 +00:00
Joe Previte e7e6c163ed
revert(docs): partially revert 326a1d1862 (#5095)
We tried to switch from `yarn` to `npm` because `yarn` ignores lockfiles
but learned that we missed a few key things.

For now, we are reverting docs and a few other changes that suggested
using `npm` instead of `yarn` until we fully remove `yarn` from the
codebase.
t Please enter the commit message for your changes. Lines starting
2022-04-13 17:15:21 +00:00
renovate[bot] c05b727c61
chore(deps): update minor dependency updates (#5060)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-12 16:39:58 -07:00
neilnaveen f4569f0b48
Set permissions for GitHub actions (#5090)
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2022-04-12 18:59:11 +00:00
Joe Previte 7f884203f0
chore(ci): disable docs-preview on forks (#5046) 2022-03-30 13:45:35 -07:00
Joe Previte 5341294d2d
fix(workflows): docs-preview and npm job (#5042)
* fix(ci): add GITHUB_TOKEN to docs-preview workflow

* feat(ci): comment npm dev build instructions on PR
2022-03-30 10:47:46 -07:00
Joe Previte 8316a27da4
refactor(brew-bump): fix homebrew bump script (#5025)
* fix: source lib.sh in docker-buildx-push for tagging version

* chore: use ubuntu and update git config homebrew job

* refactor: simplify brew-bump.sh script

* Revert "fix: source lib.sh in docker-buildx-push for tagging version"

This reverts commit 2f7a3610cb.
2022-03-29 16:58:34 -07:00
Edouard Vincent 326a1d1862
feat: Add a shrinkwrap file to the NPM release (#5010) 2022-03-29 12:33:56 -05:00
Joe Previte ba1ddbd181
fix: use -r with jq and add workflow for artifacts (#5016) 2022-03-22 16:45:59 -07:00
Asher a1af9e2a56
chore: move to patches (#4997)
* Move integration types into code-server

This will be easier to maintain than to have it as a patch.

* Disable connection token

Using a flag means we will not need to patch it out.  I think this is
new from 1.64?

* Add product.json to build process

This way we do not have to patch it.

* Ship with remote agent package.json

Instead of the root one.  This contains fewer dependencies.

* Let Code handle errors

This way we will not have to patch Code to make this work and I think it
makes sense to let Code handle the request.

If we do want to handle errors we can do it cleanly by patching their
error handler to throw instead.

* Move manifest override into code-server

This way we will not have to patch it.

* Move to patches

- Switch submodule to track upstream
- Add quilt to the process
- Add patches

The node-* ignore was ignoring one of the diffs so I removed it.  This
was added when we were curling Node as node-v{version}-darwin-x64 for
the macOS build but this no longer happens (we use the Node action to
install a specific version now so we just use the system-wide Node).

* Use pre-packaged Code
2022-03-22 15:07:14 -05:00
Joe Previte be727871f6
refactor: checkout homebrew-core in action instead of script (#4996)
* refactor: checkout homebrew-core in action instead of script

This moves the git clone step from the `brew-bump.sh` script into the
`npm-brew.yaml` as part of the job using actions/checkout instead.

* refactor: clean up brew-bump.sh script

* fixup

* fixup!: remove step to clean up homebrew repo

* fixup!: use correct ./ci path steps-lib.sh

* fixup!: add exit code 0 for duplicate PRs
2022-03-21 16:57:36 -07:00
renovate[bot] 815c4cf1f0
chore(deps): update actions/cache action to v3 (#5003)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-21 14:31:02 -07:00
Joe Previte 5afb26fb60
fix(ci): correctly download npm/docker artifacts (#4995)
* fix(ci): correctly download npm artifact

* fixup! fix(ci): correctly download npm artifact

* docs: update MAINTAINING

* fixup! docs: update MAINTAINING

* fixup! Merge branch 'main' into 4949-chore-fix-npm-workflow

* chore: get ci to run

* refactor: use vVERSION branch name instead of release

* refactor: use new download artifact in docker workflow

* refactor: clean up release-github-assets script

* fixup: remove extra v

* fixup! fixup: remove extra v
2022-03-17 11:52:39 -07:00
Asher 21c74802e8
chore: move Code to a submodule (#4990)
* Move Code to a submodule

Closes #4901.

* Base Code cache on hash and re-enable node_modules cache

The current setup appears to only rebuild VS Code if the dependencies
change but we need to rebuild it if anything changes.

I also re-enabled the commented out node_modules caches.  They look like
they should work to me with the submodule method.  I think the problem
occurred because Code itself was being installed in the yarn step.
2022-03-14 21:37:29 -05:00
Bruno Quaresma 52eaea9f7a
docs: update docs preview (#4968)
* docs: update docs preview

* Fix Ubuntu  deps

* Fix formatting
2022-03-10 13:44:27 -07:00
Joe Previte 03e0bdac03
chore: update vscode to 1.64 (#4902)
* chore: update vscode server files

* chore: update code to 1.64

* refactor: clean up code in constants.ts

* chore: keep package.json vscode cache

* fixup!: formatting

* feat(ci): add VSCODE_CACHE_VERSION

* fix(ci): add package.json for e2e tests

* fix: TS errors

* refactor: remove isConnected e2e tests
2022-03-09 14:28:52 -07:00
Joe Previte 3b93a86f25
chore: add permissions trivy-docker (#4957)
* chore: add permissions trivy-docker

* Update .github/workflows/trivy-docker.yaml
2022-03-08 13:19:57 -07:00
Joe Previte 3c6f85c282
fix: re-enable trivvy docker scan (#4943)
* fix: re-enable trivvy docker scan

* wip

* fixup

* fixup

* fixup
2022-03-04 15:59:29 -07:00
renovate[bot] f0faa22ee9
chore(deps): update actions/upload-artifact action to v3 (#4944)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-04 09:25:12 -07:00
Asher 7aa087ae34
release: v4.1.0 (#4946)
* release: bump version to 4.1.0

* Rename VS Code to Code in changelog

* Catch up changelog

* Add release as valid semantic tag
2022-03-03 14:46:17 -06:00
renovate[bot] b0181120d4
chore(deps): update actions/download-artifact action to v3 (#4937)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-02 14:31:21 -07:00
renovate[bot] 3f3a489f33
chore(deps): update actions/checkout action to v3 (#4931)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jonathan Yu <jonathan@coder.com>
2022-03-01 16:31:32 -07:00
Jonathan Yu 83269ba658
chore: limit concurrency for build jobs (#4929)
* Configure build jobs to cancel previous builds when new changes
  are pushed to a pull request branch, and serialize builds when
  running in a branch from a push event
* Reduce privileges of GitHub token for scripts workflow
2022-03-01 15:03:39 -08:00
renovate[bot] a989e0c387
chore(deps): update aquasecurity/trivy-action commit hash to 2962126 (#4907)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-25 13:53:58 -07:00
renovate[bot] 769aceacc3
chore(deps): update actions/setup-node action to v3 (#4908)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-25 09:09:09 -07:00
Joe Previte 23734d356a
fix: skip docs/npm workflows on forks (#4875)
Co-authored-by: Asher <ash@coder.com>
2022-02-22 10:13:20 -07:00
Jonathan Yu 8135d2ecc3
chore: update Docker image publish workflow (#4847)
* Use official action to log in to Docker Hub
* Run using pinned ubuntu-20.04 environment
2022-02-10 17:40:41 -08:00