|
2 | 2 |
|
3 | 3 | This directory contains scripts used for code-server's continuous integration infrastructure.
|
4 | 4 |
|
5 |
| -Many of these scripts contain more detailed documentation and options in comments at the top. |
| 5 | +Some of these scripts contain more detailed documentation and options |
| 6 | +in header comments. |
6 | 7 |
|
7 |
| -Any file and directory added into this tree should be documented here. |
| 8 | +Any file or directory in this subdirectory should be documented here. |
| 9 | + |
| 10 | +- [./ci/lib.sh](./lib.sh) |
| 11 | + - Contains code duplicated across these scripts. |
8 | 12 |
|
9 | 13 | ## Publishing a release
|
10 | 14 |
|
11 | 15 | Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub) installed.
|
12 | 16 |
|
13 |
| -1. Update the version of code-server in `package.json` and README.md/guide.md install examples and push a commit |
14 |
| -2. GitHub actions will generate the `npm-package` and `release-packages` artifacts |
| 17 | +1. Update the version of code-server in `package.json` and README.md/guide.md install examples and push a commit. |
| 18 | +2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts. |
15 | 19 | 3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
|
16 | 20 | the updated version.
|
17 | 21 | 1. Summarize the major changes in the release notes and link to the relevant issues.
|
18 |
| -4. Wait for the artifacts in step 2 to build |
19 |
| -5. Run `yarn release:github-assets` to download the artifacts and then upload them to the draft release |
20 |
| -6. Run some basic sanity tests on one of the released packages |
21 |
| -7. Publish the release |
22 |
| - 1. CI will automatically grab the artifacts and then |
23 |
| - 1. Publish the NPM package |
24 |
| - 2. Publish the Docker Hub image |
25 |
| -8. Update the homebrew and AUR packages |
| 22 | +4. Wait for the artifacts in step 2 to build. |
| 23 | +5. Run `yarn release:github-assets` to download the `release-packages` artifact and then upload them to the draft release. |
| 24 | +6. Run some basic sanity tests on one of the released packages. |
| 25 | +7. Publish the release. |
| 26 | + 1. CI will automatically grab the artifacts and then: |
| 27 | + 1. Publish the NPM package from `npm-package`. |
| 28 | + 2. Publish the Docker Hub image from `release-images`. |
| 29 | +8. Update the homebrew and AUR packages. |
26 | 30 |
|
27 | 31 | ## dev
|
28 | 32 |
|
29 | 33 | This directory contains scripts used for the development of code-server.
|
30 | 34 |
|
31 |
| -- [./dev/container](./dev/container) |
32 |
| - - See [CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container |
33 |
| -- [./dev/ci.sh](./dev/ci.sh) (`yarn ci`) |
34 |
| - - Runs `yarn fmt`, `yarn lint` and `yarn test` |
35 |
| -- [./dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`) |
36 |
| - - Runs formatters |
37 |
| -- [./dev/lint.sh](./dev/lint.sh) (`yarn lint`) |
38 |
| - - Runs linters |
39 |
| -- [./dev/test.sh](./dev/test.sh) (`yarn test`) |
40 |
| - - Runs tests |
41 |
| -- [./dev/vscode.sh](./dev/vscode.sh) (`yarn vscode`) |
42 |
| - - Ensures [../lib/vscode](../lib/vscode) is cloned, patched and dependencies are installed |
43 |
| -- [./dev/patch-vscode.sh](./dev/patch-vscode.sh) (`yarn vscode:patch`) |
44 |
| - - Applies [./dev/vscode.patch](./dev/vscode.patch) to [../lib/vscode](../lib/vscode) |
45 |
| -- [./dev/diff-vscode.sh](./dev/diff-vscode.sh) (`yarn vscode:diff`) |
46 |
| - - Diffs [../lib/vscode](../lib/vscode) into [./dev/vscode.patch](./dev/vscode.patch) |
47 |
| -- [./dev/vscode.patch](./dev/vscode.patch) |
48 |
| - - Our patch of VS Code to enable remote browser access |
49 |
| - - Generate it with `yarn vscode:diff` and apply with `yarn vscode:patch` |
50 |
| -- [./dev/watch.ts](./dev/watch.ts) (`yarn watch`) |
51 |
| - - Starts a process to build and launch code-server and restart on any code changes |
52 |
| - - Example usage in [CONTRIBUTING.md](../doc/CONTRIBUTING.md) |
| 35 | +- [./ci/dev/container](./dev/container) |
| 36 | + - See [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container. |
| 37 | +- [./ci/dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`) |
| 38 | + - Runs formatters. |
| 39 | +- [./ci/dev/lint.sh](./dev/lint.sh) (`yarn lint`) |
| 40 | + - Runs linters. |
| 41 | +- [./ci/dev/test.sh](./dev/test.sh) (`yarn test`) |
| 42 | + - Runs tests. |
| 43 | +- [./ci/dev/ci.sh](./dev/ci.sh) (`yarn ci`) |
| 44 | + - Runs `yarn fmt`, `yarn lint` and `yarn test`. |
| 45 | +- [./ci/dev/vscode.sh](./dev/vscode.sh) (`yarn vscode`) |
| 46 | + - Ensures [./lib/vscode](../lib/vscode) is cloned, patched and dependencies are installed. |
| 47 | +- [./ci/dev/patch-vscode.sh](./dev/patch-vscode.sh) (`yarn vscode:patch`) |
| 48 | + - Applies [./ci/dev/vscode.patch](./dev/vscode.patch) to [./lib/vscode](../lib/vscode). |
| 49 | +- [./ci/dev/diff-vscode.sh](./dev/diff-vscode.sh) (`yarn vscode:diff`) |
| 50 | + - Diffs [./lib/vscode](../lib/vscode) into [./ci/dev/vscode.patch](./dev/vscode.patch). |
| 51 | +- [./ci/dev/vscode.patch](./dev/vscode.patch) |
| 52 | + - Our patch of VS Code, see [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md#vs-code-patch). |
| 53 | + - Generate it with `yarn vscode:diff` and apply with `yarn vscode:patch`. |
| 54 | +- [./ci/dev/watch.ts](./dev/watch.ts) (`yarn watch`) |
| 55 | + - Starts a process to build and launch code-server and restart on any code changes. |
| 56 | + - Example usage in [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md). |
53 | 57 |
|
54 | 58 | ## build
|
55 | 59 |
|
56 | 60 | This directory contains the scripts used to build and release code-server.
|
57 | 61 | You can disable minification by setting `MINIFY=`.
|
58 | 62 |
|
59 |
| -- [./lib.sh](./lib.sh) |
60 |
| - - Contains code duplicated across these scripts. |
61 |
| -- [./build/build-code-server.sh](./build/build-code-server.sh) (`yarn build`) |
62 |
| - - Builds code-server into ./out and bundles the frontend into ./dist. |
63 |
| -- [./build/build-vscode.sh](./build/build-vscode.sh) (`yarn build:vscode`) |
64 |
| - - Builds vscode into ./lib/vscode/out-vscode. |
65 |
| -- [./build/build-release.sh](./build/build-release.sh) (`yarn release`) |
| 63 | +- [./ci/build/build-code-server.sh](./build/build-code-server.sh) (`yarn build`) |
| 64 | + - Builds code-server into `./out` and bundles the frontend into `./dist`. |
| 65 | +- [./ci/build/build-vscode.sh](./build/build-vscode.sh) (`yarn build:vscode`) |
| 66 | + - Builds vscode into `./lib/vscode/out-vscode`. |
| 67 | +- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`) |
66 | 68 | - Bundles the output of the above two scripts into a single node module at `./release`.
|
67 |
| -- [./build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`) |
68 |
| - - Requires a release already built in `./release`. |
69 |
| - - Will build a static release with node bundled into `./release-static` |
70 |
| -- [./build/clean.sh](./build/clean.sh) (`yarn clean`) |
71 |
| - - Removes all build artifacts |
72 |
| - - Will also `git reset --hard lib/vscode` |
73 |
| - - Useful to do a clean build |
74 |
| -- [./build/code-server.sh](./build/code-server.sh) |
| 69 | +- [./ci/build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`) |
| 70 | + - Requires a node module already built into `./release` with the above script. |
| 71 | + - Will build a static release with node and native modules bundled into `./release-static`. |
| 72 | +- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`) |
| 73 | + - Removes all build artifacts. |
| 74 | + - Will also `git reset --hard lib/vscode`. |
| 75 | + - Useful to do a clean build. |
| 76 | +- [./ci/build/code-server.sh](./build/code-server.sh) |
75 | 77 | - Copied into static releases to run code-server with the bundled node binary.
|
76 |
| -- [./build/test-static-release.sh](./build/test-static-release.sh) (`yarn test:static-release`) |
77 |
| - - Ensures code-server in the `./release-static` directory runs |
78 |
| -- [./build/build-packages.sh](./build/build-packages.sh) (`yarn package`) |
79 |
| - - Packages `./release-static` into an archive in `./release-packages` |
80 |
| - - If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate .deb and .rpm |
81 |
| -- [./build/nfpm.yaml](./build/nfpm.yaml) |
82 |
| - - Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate .deb and .rpm |
83 |
| -- [./build/code-server-nfpm.sh](./build/code-server-nfpm.sh) |
84 |
| - - Entrypoint script for code-server for .deb and .rpm |
85 |
| -- [./build/code-server.service](./build/code-server.service) |
86 |
| - - systemd user service packaged into the debs and rpms |
87 |
| -- [./build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`) |
88 |
| - - Uses [hub](https://github.com/github/hub) to create a draft release with a template description |
89 |
| -- [./build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`) |
90 |
| - - Downloads the release-package artifacts for the current commit from CI |
| 78 | +- [./ci/build/test-static-release.sh](./build/test-static-release.sh) (`yarn test:static-release`) |
| 79 | + - Ensures code-server in the `./release-static` directory works by installing an extension. |
| 80 | +- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`) |
| 81 | + - Packages `./release-static` into a `.tar.gz` archive in `./release-packages`. |
| 82 | + - If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`. |
| 83 | +- [./ci/build/nfpm.yaml](./build/nfpm.yaml) |
| 84 | + - Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate `.deb` and `.rpm`. |
| 85 | +- [./ci/build/code-server-nfpm.sh](./build/code-server-nfpm.sh) |
| 86 | + - Entrypoint script for code-server for `.deb` and .rpm`. |
| 87 | +- [./ci/build/code-server.service](./build/code-server.service) |
| 88 | + - systemd user service packaged into the `.deb` and `.rpm`. |
| 89 | +- [./ci/build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`) |
| 90 | + - Uses [hub](https://github.com/github/hub) to create a draft release with a template description. |
| 91 | +- [./ci/build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`) |
| 92 | + - Downloads the release-package artifacts for the current commit from CI. |
91 | 93 | - Uses [hub](https://github.com/github/hub) to upload the artifacts to the release
|
92 |
| - specified in `package.json` |
93 |
| -- [./build/npm-postinstall.sh](./build/npm-postinstall.sh) |
94 |
| - - Post install script for the npm package |
95 |
| - - Bundled by`yarn release` |
| 94 | + specified in `package.json`. |
| 95 | +- [./ci/build/npm-postinstall.sh](./build/npm-postinstall.sh) |
| 96 | + - Post install script for the npm package. |
| 97 | + - Bundled by`yarn release`. |
96 | 98 |
|
97 | 99 | ## release-container
|
98 | 100 |
|
99 | 101 | This directory contains the release docker container.
|
100 | 102 |
|
101 | 103 | - [./release-container/build.sh](./release-container/build.sh)
|
102 |
| - - Builds the release container with the tag `codercom/code-server:$VERSION-$ARCH` |
103 |
| - - Assumes debian releases are ready in `./release-packages` |
| 104 | + - Builds the release container with the tag `codercom/code-server-$ARCH:$VERSION`. |
| 105 | + - Assumes debian releases are ready in `./release-packages`. |
104 | 106 |
|
105 | 107 | ## container
|
106 | 108 |
|
107 | 109 | This directory contains the container for CI.
|
108 | 110 |
|
109 | 111 | ## steps
|
110 | 112 |
|
111 |
| -This directory contains a few scripts used in CI. |
112 |
| -Just helps avoid clobbering the CI configuration. |
| 113 | +This directory contains the scripts used in CI. |
| 114 | +Helps avoid clobbering the CI configuration. |
113 | 115 |
|
114 | 116 | - [./steps/fmt.sh](./steps/fmt.sh)
|
115 |
| - - Runs `yarn fmt` after ensuring VS Code is patched |
| 117 | + - Runs `yarn fmt` after ensuring VS Code is patched. |
116 | 118 | - [./steps/lint.sh](./steps/lint.sh)
|
117 |
| - - Runs `yarn lint` after ensuring VS Code is patched |
| 119 | + - Runs `yarn lint` after ensuring VS Code is patched. |
118 | 120 | - [./steps/test.sh](./steps/test.sh)
|
119 |
| - - Runs `yarn test` after ensuring VS Code is patched |
| 121 | + - Runs `yarn test` after ensuring VS Code is patched. |
120 | 122 | - [./steps/release.sh](./steps/release.sh)
|
121 |
| - - Runs the full release process |
122 |
| - - Generates the npm package at `./release` |
123 |
| -- [./steps/static-release.sh](./steps/static-release.sh) |
124 |
| - - Takes the output of the previous script and generates a static release and packages |
125 |
| -- [./steps/lib.sh](./steps/lib.sh) |
126 |
| - - Contains helpers to download artifacts from github actions workflow runs |
| 123 | + - Runs the release process. |
| 124 | + - Generates the npm package at `./release`. |
| 125 | +- [./steps/release-static.sh](./steps/release-static.sh) |
| 126 | + - Takes the output of the previous script and generates a self-contained release and |
| 127 | + release packages into `release-packages`. |
127 | 128 | - [./steps/publish-npm.sh](./steps/publish-npm.sh)
|
128 |
| - - Grabs the `npm-package` release artifact for the current commit and publishes it on NPM |
| 129 | + - Grabs the `npm-package` release artifact for the current commit and publishes it on npm. |
129 | 130 | - [./steps/build-docker-image.sh](./steps/build-docker-image.sh)
|
130 |
| - - Builds the docker image and then saves it into `./release-images/$ARCH.tar` |
| 131 | + - Builds the docker image and then saves it into `./release-images/code-server-$ARCH-$VERSION.tar`. |
131 | 132 | - [./steps/push-docker-manifest.sh](./steps/push-docker-manifest.sh)
|
132 | 133 | - Loads all images in `./release-images` and then builds and pushes a multi architecture
|
133 | 134 | docker manifest for the amd64 and arm64 images to `codercom/code-server:$VERSION` and
|
134 |
| - `codercom/code-server:latest` |
| 135 | + `codercom/code-server:latest`. |
0 commit comments