Skip to content

Commit 3ca4dcd

Browse files
committed
Downgrade CI to Debian 8 for glibc 2.19
Closes #1656
1 parent 761c203 commit 3ca4dcd

File tree

7 files changed

+85
-12
lines changed

7 files changed

+85
-12
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
name: npm-package
7676
path: ./release
7777
- name: Run ./ci/steps/release-static.sh
78-
uses: ./ci/container
78+
uses: ./ci/container/arm64
7979
with:
8080
args: ./ci/steps/release-static.sh
8181
- name: Upload release artifacts
@@ -138,7 +138,7 @@ jobs:
138138
name: release-packages
139139
path: ./release-packages
140140
- name: Run ./ci/steps/build-docker-image.sh
141-
uses: ./ci/container
141+
uses: ./ci/container/arm64
142142
with:
143143
args: ./ci/steps/build-docker-image.sh
144144
- name: Upload release image

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ systemctl --user enable --now code-server
3636
### npm
3737

3838
We recommend installing from `npm` if we don't have a precompiled release for your machine's
39-
platform or architecture.
39+
platform or architecture or your glibc < v2.19.
4040

4141
**note:** Installing via `npm` builds native modules on install and so requires C dependencies.
4242
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.

ci/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub)
2323
5. Run `yarn release:github-assets` to download the `release-packages` artifact and then
2424
upload them to the draft release.
2525
6. Run some basic sanity tests on one of the released packages.
26-
7. Publish the release.
26+
7. Make sure the github release tag is the commit with the artifacts.
27+
8. Publish the release.
2728
1. CI will automatically grab the artifacts and then:
2829
1. Publish the NPM package from `npm-package`.
2930
2. Publish the Docker Hub image from `release-images`.
30-
8. Update the homebrew and AUR packages.
31+
9. Update the homebrew and AUR packages.
3132

3233
## dev
3334

ci/container/Dockerfile

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian
1+
FROM debian:8
22

33
RUN apt-get update
44

@@ -24,13 +24,23 @@ RUN apt-get install -y build-essential \
2424
RUN apt-get install -y gettext-base
2525

2626
# Misc build dependencies.
27-
RUN apt-get install -y jq git rsync
27+
RUN apt-get install -y git rsync
28+
29+
# We need latest jq from debian buster for date support.
30+
RUN ARCH="$(dpkg --print-architecture)" && \
31+
curl -sSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
32+
dpkg -i libonig*.deb && \
33+
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
34+
dpkg -i libjq*.deb && \
35+
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
36+
dpkg -i jq*.deb && rm *.deb
2837

2938
# Installs shellcheck.
30-
RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
31-
tar -xJ && \
32-
mv shellcheck*/shellcheck /usr/local/bin && \
33-
rm -R shellcheck*
39+
# Unfortunately coredumps on debian:8 so disabled for now.
40+
#RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
41+
# tar -xJ && \
42+
# mv shellcheck*/shellcheck /usr/local/bin && \
43+
# rm -R shellcheck*
3444

3545
# Install Go dependencies
3646
RUN ARCH="$(dpkg --print-architecture)" && \

ci/container/arm64/Dockerfile

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM debian:9
2+
3+
RUN apt-get update
4+
5+
# Needed for debian repositories added below.
6+
RUN apt-get install -y curl gnupg
7+
8+
# Installs node.
9+
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - && \
10+
apt-get install -y nodejs
11+
12+
# Installs yarn.
13+
RUN curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
14+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
15+
apt-get update && apt-get install -y yarn
16+
17+
# Installs VS Code build deps.
18+
RUN apt-get install -y build-essential \
19+
libsecret-1-dev \
20+
libx11-dev \
21+
libxkbfile-dev
22+
23+
# Installs envsubst.
24+
RUN apt-get install -y gettext-base
25+
26+
# Misc build dependencies.
27+
RUN apt-get install -y git rsync
28+
29+
# We need latest jq from debian buster for date support.
30+
RUN ARCH="$(dpkg --print-architecture)" && \
31+
curl -sSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
32+
dpkg -i libonig*.deb && \
33+
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
34+
dpkg -i libjq*.deb && \
35+
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
36+
dpkg -i jq*.deb && rm *.deb
37+
38+
# Installs shellcheck.
39+
# Unfortunately coredumps on debian:8 so disabled for now.
40+
#RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
41+
# tar -xJ && \
42+
# mv shellcheck*/shellcheck /usr/local/bin && \
43+
# rm -R shellcheck*
44+
45+
# Install Go dependencies
46+
RUN ARCH="$(dpkg --print-architecture)" && \
47+
curl -sSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
48+
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
49+
ENV GO111MODULE=on
50+
RUN go get mvdan.cc/sh/v3/cmd/shfmt
51+
RUN go get github.com/goreleaser/nfpm/cmd/nfpm
52+
53+
RUN curl -fsSL https://get.docker.com | sh

ci/container/arm64/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# arm64
2+
3+
Unfortunately there is no arm64 build of `debian:8` so
4+
we need to use `debian:9` instead.
5+
6+
This is just an exact copy of [../Dockerfile](../Dockerfile) with the base image change.

ci/dev/lint.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ main() {
77
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js")
88
stylelint $(git ls-files "*.css")
99
tsc --noEmit
10-
shellcheck -e SC2046,SC2164,SC2154 $(git ls-files "*.sh")
10+
# See comment in ./ci/container/Dockerfile
11+
if [[ ! ${CI-} ]]; then
12+
shellcheck -e SC2046,SC2164,SC2154 $(git ls-files "*.sh")
13+
fi
1114
}
1215

1316
main "$@"

0 commit comments

Comments
 (0)