Skip to content

Commit 5b5bc16

Browse files
committed
Focal init commit
1 parent d1ae5a9 commit 5b5bc16

12 files changed

+64
-53
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Readme
2525

2626
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
27-
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-code-server/edit/master/readme-vars.yml).
27+
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-code-server/edit/focal/readme-vars.yml).
2828

2929
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
3030
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-code-server)
@@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
115115

116116
## Update the changelog
117117

118-
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-code-server/tree/master/root), add an entry to the changelog
118+
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-code-server/tree/focal/root), add an entry to the changelog
119119

120120
```yml
121121
changelogs:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
24+
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-code-server/blob/focal/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
2525

2626
------------------------------
2727

.github/workflows/external_trigger.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
external-trigger-master:
7+
external-trigger-focal:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/[email protected]
1111

1212
- name: External Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/focal'
1414
run: |
15-
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
16-
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
15+
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_FOCAL }}" ]; then
16+
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_FOCAL is set; skipping trigger. ****"
1717
exit 0
1818
fi
19-
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\". ****"
19+
echo "**** External trigger running off of focal branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_FOCAL\". ****"
2020
echo "**** Retrieving external version ****"
2121
EXT_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|')
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
24-
FAILURE_REASON="Can't retrieve external version for code-server branch master"
24+
FAILURE_REASON="Can't retrieve external version for code-server branch focal"
2525
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-code-server/actions/runs/${{ github.run_id }}"
2626
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
2727
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
@@ -64,13 +64,13 @@ jobs:
6464
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
6565
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
6666
exit 0
67-
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
67+
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/lastBuild/api/json | jq -r '.building') == "true" ]; then
6868
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
6969
exit 0
7070
else
7171
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
7272
response=$(curl -iX POST \
73-
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
73+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/buildWithParameters?PACKAGE_CHECK=false \
7474
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
7575
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
7676
echo "**** Sleeping 10 seconds until job starts ****"

.github/workflows/greetings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- uses: actions/first-interaction@v1
1010
with:
11-
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-code-server/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-code-server/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-code-server/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
11+
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-code-server/blob/focal/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-code-server/blob/focal/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-code-server/blob/focal/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/package_trigger.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
package-trigger-master:
7+
package-trigger-focal:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/[email protected]
1111

1212
- name: Package Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/focal'
1414
run: |
15-
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
16-
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
15+
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_FOCAL }}" ]; then
16+
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_FOCAL is set; skipping trigger. ****"
1717
exit 0
1818
fi
19-
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
19+
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/lastBuild/api/json | jq -r '.building') == "true" ]; then
2020
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
2121
exit 0
2222
fi
23-
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\". ****"
23+
echo "**** Package trigger running off of focal branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_FOCAL\". ****"
2424
response=$(curl -iX POST \
25-
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=true \
25+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/buildWithParameters?PACKAGE_CHECK=true \
2626
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
2727
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
2828
echo "**** Sleeping 10 seconds until job starts ****"

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
22

33
# set version label
44
ARG BUILD_DATE
@@ -16,7 +16,7 @@ RUN \
1616
apt-get install -y \
1717
gnupg && \
1818
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19-
echo 'deb https://deb.nodesource.com/node_14.x bionic main' \
19+
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
2020
> /etc/apt/sources.list.d/nodesource.list && \
2121
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
2222
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
@@ -25,10 +25,11 @@ RUN \
2525
apt-get update && \
2626
apt-get install -y \
2727
build-essential \
28+
libsecret-1-dev \
2829
libx11-dev \
2930
libxkbfile-dev \
30-
libsecret-1-dev \
31-
pkg-config && \
31+
pkg-config \
32+
python3 && \
3233
echo "**** install runtime dependencies ****" && \
3334
apt-get install -y \
3435
git \
@@ -44,6 +45,7 @@ RUN \
4445
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
4546
fi && \
4647
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
48+
npm config set python python3 \
4749
yarn config set network-timeout 600000 -g && \
4850
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
4951
yarn cache clean && \
@@ -56,6 +58,7 @@ RUN \
5658
pkg-config && \
5759
apt-get clean && \
5860
rm -rf \
61+
/config/* \
5962
/tmp/* \
6063
/var/lib/apt/lists/* \
6164
/var/tmp/*

Dockerfile.aarch64

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
22

33
# set version label
44
ARG BUILD_DATE
@@ -16,7 +16,7 @@ RUN \
1616
apt-get install -y \
1717
gnupg && \
1818
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19-
echo 'deb https://deb.nodesource.com/node_14.x bionic main' \
19+
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
2020
> /etc/apt/sources.list.d/nodesource.list && \
2121
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
2222
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
@@ -25,10 +25,11 @@ RUN \
2525
apt-get update && \
2626
apt-get install -y \
2727
build-essential \
28+
libsecret-1-dev \
2829
libx11-dev \
2930
libxkbfile-dev \
30-
libsecret-1-dev \
31-
pkg-config && \
31+
pkg-config \
32+
python3 && \
3233
echo "**** install runtime dependencies ****" && \
3334
apt-get install -y \
3435
git \
@@ -44,6 +45,7 @@ RUN \
4445
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
4546
fi && \
4647
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
48+
npm config set python python3 \
4749
yarn config set network-timeout 600000 -g && \
4850
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
4951
yarn cache clean && \
@@ -56,6 +58,7 @@ RUN \
5658
pkg-config && \
5759
apt-get clean && \
5860
rm -rf \
61+
/config/* \
5962
/tmp/* \
6063
/var/lib/apt/lists/* \
6164
/var/tmp/*

Dockerfile.armhf

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
22

33
# set version label
44
ARG BUILD_DATE
@@ -16,7 +16,7 @@ RUN \
1616
apt-get install -y \
1717
gnupg && \
1818
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19-
echo 'deb https://deb.nodesource.com/node_14.x bionic main' \
19+
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
2020
> /etc/apt/sources.list.d/nodesource.list && \
2121
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
2222
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
@@ -25,10 +25,11 @@ RUN \
2525
apt-get update && \
2626
apt-get install -y \
2727
build-essential \
28+
libsecret-1-dev \
2829
libx11-dev \
2930
libxkbfile-dev \
30-
libsecret-1-dev \
31-
pkg-config && \
31+
pkg-config \
32+
python3 && \
3233
echo "**** install runtime dependencies ****" && \
3334
apt-get install -y \
3435
git \
@@ -44,6 +45,7 @@ RUN \
4445
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
4546
fi && \
4647
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
48+
npm config set python python3 \
4749
yarn config set network-timeout 600000 -g && \
4850
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
4951
yarn cache clean && \
@@ -56,6 +58,7 @@ RUN \
5658
pkg-config && \
5759
apt-get clean && \
5860
rm -rf \
61+
/config/* \
5962
/tmp/* \
6063
/var/lib/apt/lists/* \
6164
/var/tmp/*

Jenkinsfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ pipeline {
119119
}
120120
}
121121
}
122-
// If this is a master build use live docker endpoints
122+
// If this is a focal build use live docker endpoints
123123
stage("Set ENV live build"){
124124
when {
125-
branch "master"
125+
branch "focal"
126126
environment name: 'CHANGE_ID', value: ''
127127
}
128128
steps {
@@ -144,7 +144,7 @@ pipeline {
144144
// If this is a dev build use dev docker endpoints
145145
stage("Set ENV dev build"){
146146
when {
147-
not {branch "master"}
147+
not {branch "focal"}
148148
environment name: 'CHANGE_ID', value: ''
149149
}
150150
steps {
@@ -219,7 +219,7 @@ pipeline {
219219
// Use helper containers to render templated files
220220
stage('Update-Templates') {
221221
when {
222-
branch "master"
222+
branch "focal"
223223
environment name: 'CHANGE_ID', value: ''
224224
expression {
225225
env.CONTAINER_NAME != null
@@ -230,13 +230,13 @@ pipeline {
230230
set -e
231231
TEMPDIR=$(mktemp -d)
232232
docker pull ghcr.io/linuxserver/jenkins-builder:latest
233-
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
233+
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=focal -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
234234
# Stage 1 - Jenkinsfile update
235235
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
236236
mkdir -p ${TEMPDIR}/repo
237237
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
238238
cd ${TEMPDIR}/repo/${LS_REPO}
239-
git checkout -f master
239+
git checkout -f focal
240240
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
241241
git add Jenkinsfile
242242
git commit -m 'Bot Updating Templated Files'
@@ -259,7 +259,7 @@ pipeline {
259259
mkdir -p ${TEMPDIR}/repo
260260
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
261261
cd ${TEMPDIR}/repo/${LS_REPO}
262-
git checkout -f master
262+
git checkout -f focal
263263
for i in ${TEMPLATES_TO_DELETE}; do
264264
git rm "${i}"
265265
done
@@ -280,7 +280,7 @@ pipeline {
280280
mkdir -p ${TEMPDIR}/repo
281281
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
282282
cd ${TEMPDIR}/repo/${LS_REPO}
283-
git checkout -f master
283+
git checkout -f focal
284284
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
285285
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
286286
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
@@ -336,7 +336,7 @@ pipeline {
336336
// Exit the build if the Templated files were just updated
337337
stage('Template-exit') {
338338
when {
339-
branch "master"
339+
branch "focal"
340340
environment name: 'CHANGE_ID', value: ''
341341
environment name: 'FILES_UPDATED', value: 'true'
342342
expression {
@@ -497,7 +497,7 @@ pipeline {
497497
// Take the image we just built and dump package versions for comparison
498498
stage('Update-packages') {
499499
when {
500-
branch "master"
500+
branch "focal"
501501
environment name: 'CHANGE_ID', value: ''
502502
environment name: 'EXIT_STATUS', value: ''
503503
}
@@ -534,7 +534,7 @@ pipeline {
534534
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
535535
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
536536
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
537-
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
537+
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f focal
538538
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
539539
cd ${TEMPDIR}/${LS_REPO}/
540540
wait
@@ -558,7 +558,7 @@ pipeline {
558558
// Exit the build if the package file was just updated
559559
stage('PACKAGE-exit') {
560560
when {
561-
branch "master"
561+
branch "focal"
562562
environment name: 'CHANGE_ID', value: ''
563563
environment name: 'PACKAGE_UPDATED', value: 'true'
564564
environment name: 'EXIT_STATUS', value: ''
@@ -579,7 +579,7 @@ pipeline {
579579
// Exit the build if this is just a package check and there are no changes to push
580580
stage('PACKAGECHECK-exit') {
581581
when {
582-
branch "master"
582+
branch "focal"
583583
environment name: 'CHANGE_ID', value: ''
584584
environment name: 'PACKAGE_UPDATED', value: 'false'
585585
environment name: 'EXIT_STATUS', value: ''
@@ -781,7 +781,7 @@ pipeline {
781781
// If this is a public release tag it in the LS Github
782782
stage('Github-Tag-Push-Release') {
783783
when {
784-
branch "master"
784+
branch "focal"
785785
expression {
786786
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
787787
}
@@ -793,14 +793,14 @@ pipeline {
793793
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
794794
-d '{"tag":"'${META_TAG}'",\
795795
"object": "'${COMMIT_SHA}'",\
796-
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
796+
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to focal",\
797797
"type": "commit",\
798798
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
799799
echo "Pushing New release for Tag"
800800
sh '''#! /bin/bash
801801
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
802802
echo '{"tag_name":"'${META_TAG}'",\
803-
"target_commitish": "master",\
803+
"target_commitish": "focal",\
804804
"name": "'${META_TAG}'",\
805805
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
806806
printf '","draft": false,"prerelease": false}' >> releasebody.json

0 commit comments

Comments
 (0)