Skip to content

Commit ff34097

Browse files
authored
Merge pull request #1 from cdr/main
Merge cdr/main into galesky/main
2 parents 316c3aa + bc3acb0 commit ff34097

File tree

34 files changed

+575
-126
lines changed

34 files changed

+575
-126
lines changed

.github/ranger.yml

-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ labels:
1515
"squash when passing": merge
1616
"rebase when passing": merge
1717
"merge when passing": merge
18-
stale:
19-
action: close
20-
delay: 7 days
21-
comment: "⚠️ This issue has been marked stale and will automatically be closed in $DELAY."
2218
"new contributor":
2319
action: comment
2420
delay: 5s

.github/stale.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 180
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 5
5+
# Label to apply when stale.
6+
staleLabel: stale
7+
# Comment to post when marking an issue as stale. Set to `false` to disable
8+
markComment: >
9+
This issue has been automatically marked as stale because it has not had
10+
recent activity. It will be closed if no activity occurs in the next 5 days.
11+
# Comment to post when closing a stale issue. Set to `false` to disable
12+
closeComment: false

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ jobs:
420420
uses: actions/checkout@v2
421421
- name: Run Trivy vulnerability scanner in repo mode
422422
#Commit SHA for v0.0.17
423-
uses: aquasecurity/trivy-action@9438b49cc3156b2e8c77c1ba8ffbaa3bae24e3c2
423+
uses: aquasecurity/trivy-action@8eccb5539730451af599c84f444c6d6cf0fc2bb0
424424
with:
425425
scan-type: "fs"
426426
scan-ref: "."

.github/workflows/docs-preview.yaml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Docs preview
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
actions: none
10+
checks: none
11+
contents: read
12+
deployments: none
13+
issues: none
14+
packages: none
15+
pull-requests: write
16+
repository-projects: none
17+
security-events: none
18+
statuses: none
19+
20+
jobs:
21+
preview:
22+
name: Docs preview
23+
runs-on: ubuntu-20.04
24+
steps:
25+
- name: Cancel Previous Runs
26+
uses: styfle/[email protected]
27+
28+
- name: Checkout m
29+
uses: actions/checkout@v2
30+
with:
31+
repository: cdr/m
32+
ref: refs/heads/master
33+
token: ${{ secrets.GH_ACCESS_TOKEN }}
34+
submodules: true
35+
fetch-depth: 0
36+
37+
- name: Install Node.js
38+
uses: actions/setup-node@v2
39+
with:
40+
node-version: 12.x
41+
42+
- name: Cache Node Modules
43+
uses: actions/cache@v2
44+
with:
45+
path: "/node_modules"
46+
key: node-${{ hashFiles('yarn.lock') }}
47+
48+
- name: Create Deployment
49+
id: deployment
50+
run: ./ci/scripts/github_deployment.sh create
51+
env:
52+
GITHUB_TOKEN: ${{ github.token }}
53+
DEPLOY_ENVIRONMENT: codercom-preview-docs
54+
55+
- name: Deploy Preview to Vercel
56+
id: preview
57+
run: ./ci/scripts/deploy_vercel.sh
58+
env:
59+
VERCEL_ORG_ID: team_tGkWfhEGGelkkqUUm9nXq17r
60+
VERCEL_PROJECT_ID: QmZRucMRh3GFk1817ZgXjRVuw5fhTspHPHKct3JNQDEPGd
61+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
62+
CODE_SERVER_DOCS_MAIN_BRANCH: ${{ github.event.pull_request.head.sha }}
63+
64+
- name: Install node_modules
65+
run: yarn install
66+
67+
- name: Check docs
68+
run: yarn ts-node ./product/coder.com/site/scripts/checkDocs.ts
69+
env:
70+
BASE_URL: ${{ steps.preview.outputs.url }}
71+
72+
- name: Update Deployment
73+
# If we don't specify always, it won't run this check if failed.
74+
# This means the deployment would be stuck pending.
75+
if: always()
76+
run: ./ci/scripts/github_deployment.sh update
77+
env:
78+
GITHUB_DEPLOYMENT: ${{ steps.deployment.outputs.id }}
79+
GITHUB_TOKEN: ${{ github.token }}
80+
DEPLOY_STATUS: ${{ steps.preview.outcome }}
81+
DEPLOY_URL: ${{ steps.preview.outputs.url }}
82+
83+
- name: Comment Credentials
84+
uses: marocchino/sticky-pull-request-comment@v2
85+
if: always()
86+
with:
87+
header: codercom-preview-docs
88+
message: |
89+
✨ Coder.com for PR #${{ github.event.number }} deployed! It will be updated on every commit.
90+
91+
* _Host_: ${{ steps.preview.outputs.url }}/docs/code-server
92+
* _Last deploy status_: ${{ steps.preview.outcome }}
93+
* _Commit_: ${{ github.event.pull_request.head.sha }}
94+
* _Workflow status_: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

ci/build/build-release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bundle_code_server() {
4848
{
4949
"commit": "$(git rev-parse HEAD)",
5050
"scripts": {
51-
"postinstall": "./postinstall.sh"
51+
"postinstall": "bash ./postinstall.sh"
5252
}
5353
}
5454
EOF

ci/build/build-vscode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ main() {
1010
cd "$(dirname "${0}")/../.."
1111
cd lib/vscode
1212

13-
yarn gulp compile-build compile-extensions-build
13+
yarn gulp compile-build compile-extensions-build compile-extension-media
1414
yarn gulp optimize --gulpfile ./coder.js
1515
if [[ $MINIFY ]]; then
1616
yarn gulp minify --gulpfile ./coder.js

ci/helm-chart/values.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@ ingress:
5757

5858
# Optional additional arguments
5959
extraArgs: []
60-
# - --allow-http
61-
# - --no-auth
60+
# These are the arguments normally passed to code-server; run
61+
# code-server --help for a list of available options.
62+
#
63+
# Each argument and parameter must have its own entry; if you use
64+
# --param value on the command line, then enter it here as:
65+
#
66+
# - --param
67+
# - value
68+
#
69+
# If you receive an error like "Unknown option --param value", it may be
70+
# because both the parameter and value are specified as a single argument,
71+
# rather than two separate arguments (e.g. "- --param value" on a line).
6272

6373
# Optional additional environment variables
6474
extraVars: []

ci/release-image/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:10
1+
FROM debian:11
22

33
RUN apt-get update \
44
&& apt-get install -y \

ci/release-image/docker-bake.hcl

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ group "default" {
1212

1313
target "code-server" {
1414
dockerfile = "ci/release-image/Dockerfile"
15-
tags = ["docker.io/codercom/code-server:${VERSION}"]
15+
tags = [
16+
"docker.io/codercom/code-server:latest",
17+
notequal("latest",VERSION) ? "docker.io/codercom/code-server:${VERSION}" : "",
18+
]
1619
platforms = ["linux/amd64", "linux/arm64"]
1720
}

ci/steps/publish-npm.sh

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ main() {
2020
download_artifact npm-package ./release-npm-package
2121
# https://github.com/actions/upload-artifact/issues/38
2222
tar -xzf release-npm-package/package.tar.gz
23+
24+
# Ignore symlink when publishing npm package
25+
# See: https://github.com/cdr/code-server/pull/3935
26+
echo "node_modules.asar" > release/.npmignore
2327
yarn publish --non-interactive release
2428
}
2529

docs/FAQ.md

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [What's the difference between code-server and VS Code Codespaces?](#whats-the-difference-between-code-server-and-vs-code-codespaces)
3030
- [Does code-server have any security login validation?](#does-code-server-have-any-security-login-validation)
3131
- [Are there community projects involving code-server?](#are-there-community-projects-involving-code-server)
32+
- [How do I change the port?](#how-do-i-change-the-port)
3233

3334
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3435

@@ -399,3 +400,10 @@ minute plus an additional twelve per hour.
399400
Visit the [awesome-code-server](https://github.com/cdr/awesome-code-server)
400401
repository to view community projects and guides with code-server! Feel free to
401402
add your own!
403+
404+
## How do I change the port?
405+
406+
There are two ways to change the port on which code-server runs:
407+
408+
1. with an environment variable e.g. `PORT=3000 code-server`
409+
2. using the flag `--bind-addr` e.g. `code-server --bind-addr localhost:3000`

docs/MAINTAINING.md

+15
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- [Changelog](#changelog)
1313
- [Releases](#releases)
1414
- [Publishing a release](#publishing-a-release)
15+
- [Documentation](#documentation)
16+
- [Troubleshooting](#troubleshooting)
1517

1618
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1719

@@ -156,3 +158,16 @@ If you're the current release manager, follow these steps:
156158
1. Update the AUR package. Instructions for updating the AUR package are at
157159
[cdr/code-server-aur](https://github.com/cdr/code-server-aur).
158160
1. Wait for the npm package to be published.
161+
162+
## Documentation
163+
164+
### Troubleshooting
165+
166+
Our docs are hosted on [Vercel](https://vercel.com/). Vercel only shows logs in realtime, which means you need to have the logs open in one tab and reproduce your error in another tab. Since our logs are private to Coder the organization, you can only follow these steps if you're a Coder employee. Ask a maintainer for help if you need it.
167+
168+
Taking a real scenario, let's say you wanted to troubleshoot [this docs change](https://github.com/cdr/code-server/pull/4042). Here is how you would do it:
169+
170+
1. Go to https://vercel.com/codercom/codercom
171+
2. Click "View Function Logs"
172+
3. In a separate tab, open the preview link from github-actions-bot
173+
4. Now look at the function logs and see if there are errors in the logs

docs/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ There are three ways to get started:
3030
automates most of the process. The script uses the system package manager if
3131
possible.
3232
2. Manually [installing
33-
code-server](https://coder.com/docs/code-server/v3.11.1/install)
33+
code-server](https://coder.com/docs/code-server/latest/install)
3434
3. Using our one-click buttons and guides to [deploy code-server to a cloud
3535
provider](https://github.com/cdr/deploy-code-server)
3636

@@ -51,20 +51,20 @@ When done, the install script prints out instructions for running and starting
5151
code-server.
5252

5353
We also have an in-depth [setup and
54-
configuration](https://coder.com/docs/code-server/v3.11.1/guide) guide.
54+
configuration](https://coder.com/docs/code-server/latest/guide) guide.
5555

5656
## TLS and authentication (beta)
5757

58-
To add TLS and authentication out of the box, use [code-server --link](https://coder.com/docs/code-server/v3.11.0/link).
58+
To add TLS and authentication out of the box, use [code-server --link](https://coder.com/docs/code-server/latest/link).
5959

6060
## Questions?
6161

6262
See answers to [frequently asked
63-
questions](https://coder.com/docs/code-server/v3.11.1/FAQ).
63+
questions](https://coder.com/docs/code-server/latest/FAQ).
6464

6565
## Want to help?
6666

67-
See [Contributing](https://coder.com/docs/code-server/v3.11.1/CONTRIBUTING) for
67+
See [Contributing](https://coder.com/docs/code-server/latest/CONTRIBUTING) for
6868
details.
6969

7070
## Hiring

docs/assets/screenshot.png

-617 KB
Loading

0 commit comments

Comments
 (0)