-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jsjoeio/fix-password-hash
- Loading branch information
Showing
15 changed files
with
192 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,10 @@ jobs: | |
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Install helm | ||
uses: azure/[email protected] | ||
|
@@ -67,10 +67,10 @@ jobs: | |
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Fetch dependencies from cache | ||
id: cache-yarn | ||
|
@@ -96,10 +96,10 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Fetch dependencies from cache | ||
id: cache-yarn | ||
|
@@ -169,10 +169,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Install development tools | ||
run: | | ||
|
@@ -244,10 +244,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Install nfpm | ||
run: | | ||
|
@@ -270,8 +270,8 @@ jobs: | |
|
||
- name: Replace node with arm64 equivalent | ||
run: | | ||
wget https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-arm64.tar.gz | ||
tar -xzf node-v12.18.4-linux-arm64.tar.gz node-v12.18.4-linux-arm64/bin/node --strip-components=2 | ||
wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-arm64.tar.xz | ||
tar -xf node-v14.17.0-linux-arm64.tar.xz node-v14.17.0-linux-arm64/bin/node --strip-components=2 | ||
mv ./node ./release-standalone/lib/node | ||
- name: Build packages with nfpm | ||
|
@@ -290,10 +290,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Install nfpm | ||
run: | | ||
|
@@ -333,10 +333,10 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js v12 | ||
- name: Install Node.js v14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12" | ||
node-version: "14" | ||
|
||
- name: Install playwright | ||
uses: microsoft/playwright-github-action@v1 | ||
|
@@ -386,9 +386,10 @@ jobs: | |
- name: Remove release packages and test artifacts | ||
run: rm -rf ./release-packages ./test/test-results | ||
|
||
docker-amd64: | ||
# Builds both amd64 and arm64 images | ||
docker-images: | ||
runs-on: ubuntu-latest | ||
needs: package-linux-amd64 | ||
needs: [package-linux-amd64, package-linux-arm64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -398,42 +399,24 @@ jobs: | |
name: release-packages | ||
path: ./release-packages | ||
|
||
- name: Run ./ci/steps/build-docker-image.sh | ||
run: ./ci/steps/build-docker-image.sh | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Upload release image | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release-images | ||
path: ./release-images | ||
|
||
# TODO: this is the last place where we use our self-hosted arm64 runner. | ||
# In the future, consider switching to docker buildx + qemu, | ||
# thus removing the requirement for us to maintain the runner. | ||
docker-arm64: | ||
runs-on: ubuntu-arm64-latest | ||
needs: package-linux-arm64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download release package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: release-packages | ||
path: ./release-packages | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Run ./ci/steps/build-docker-image.sh | ||
run: ./ci/steps/build-docker-image.sh | ||
|
||
- name: Upload release image | ||
- name: Upload release images | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release-images | ||
path: ./release-images | ||
|
||
trivy-scan-image: | ||
runs-on: ubuntu-20.04 | ||
needs: docker-amd64 | ||
needs: docker-images | ||
# NOTE@jsjoeio: disabling due to a memory issue upstream | ||
# See: https://github.com/github/codeql-action/issues/528 | ||
if: 1 == 2 | ||
|
@@ -449,7 +432,7 @@ jobs: | |
|
||
- name: Run Trivy vulnerability scanner in image mode | ||
# Commit SHA for v0.0.17 | ||
uses: aquasecurity/trivy-action@dba83feec810c70bacbc4bead308ae1e466c572b | ||
uses: aquasecurity/trivy-action@ac8de07fd168680dd0331bef43681c0e150e9ad1 | ||
with: | ||
input: "./release-images/code-server-amd64-*.tar" | ||
scan-type: "image" | ||
|
@@ -466,6 +449,7 @@ jobs: | |
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: "trivy-image-results.sarif" | ||
|
||
# We have to use two trivy jobs | ||
# because GitHub only allows | ||
# codeql/upload-sarif action per job | ||
|
@@ -476,7 +460,7 @@ jobs: | |
uses: actions/checkout@v2 | ||
- name: Run Trivy vulnerability scanner in repo mode | ||
#Commit SHA for v0.0.17 | ||
uses: aquasecurity/trivy-action@dba83feec810c70bacbc4bead308ae1e466c572b | ||
uses: aquasecurity/trivy-action@ac8de07fd168680dd0331bef43681c0e150e9ad1 | ||
with: | ||
scan-type: "fs" | ||
scan-ref: "." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Use this file from the top of the repo, with `-f ci/release-image/docker-bake.hcl` | ||
|
||
# Uses env var VERSION if set; | ||
# normally, this is set by ci/lib.sh | ||
variable "VERSION" { | ||
default = "latest" | ||
} | ||
|
||
group "default" { | ||
targets = ["code-server-amd64", "code-server-arm64"] | ||
} | ||
|
||
target "code-server-amd64" { | ||
dockerfile = "ci/release-image/Dockerfile" | ||
tags = ["docker.io/codercom/code-server-amd64:${VERSION}"] | ||
platforms = ["linux/amd64"] | ||
output = ["type=tar,dest=./release-images/code-server-amd64-${VERSION}.tar"] | ||
} | ||
|
||
target "code-server-arm64" { | ||
dockerfile = "ci/release-image/Dockerfile" | ||
tags = ["docker.io/codercom/code-server-arm64:${VERSION}"] | ||
platforms = ["linux/arm64"] | ||
output = ["type=tar,dest=./release-images/code-server-arm64-${VERSION}.tar"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.