mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-27 06:25:41 +01:00
Merge pull request #75 from linuxserver/focal-init
This commit is contained in:
commit
3b78d9e7c6
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@ -24,7 +24,7 @@
|
|||||||
## Readme
|
## Readme
|
||||||
|
|
||||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-code-server/edit/master/readme-vars.yml).
|
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-code-server/edit/focal/readme-vars.yml).
|
||||||
|
|
||||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-code-server)
|
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
|
|||||||
|
|
||||||
## Update the changelog
|
## Update the changelog
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
changelogs:
|
changelogs:
|
||||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
- [ ] 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
|
- [ ] 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
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
16
.github/workflows/external_trigger.yml
vendored
16
.github/workflows/external_trigger.yml
vendored
@ -4,24 +4,24 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
external-trigger-master:
|
external-trigger-focal:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.3
|
- uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
- name: External Trigger
|
- name: External Trigger
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/focal'
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_FOCAL }}" ]; then
|
||||||
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_FOCAL is set; skipping trigger. ****"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\". ****"
|
echo "**** External trigger running off of focal branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_FOCAL\". ****"
|
||||||
echo "**** Retrieving external version ****"
|
echo "**** Retrieving external version ****"
|
||||||
EXT_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|')
|
EXT_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '."dist-tags".latest' | sed 's|^|v|')
|
||||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||||
echo "**** Can't retrieve external version, exiting ****"
|
echo "**** Can't retrieve external version, exiting ****"
|
||||||
FAILURE_REASON="Can't retrieve external version for code-server branch master"
|
FAILURE_REASON="Can't retrieve external version for code-server branch focal"
|
||||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-code-server/actions/runs/${{ github.run_id }}"
|
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-code-server/actions/runs/${{ github.run_id }}"
|
||||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
|
||||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
||||||
@ -64,13 +64,13 @@ jobs:
|
|||||||
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
|
||||||
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
|
||||||
exit 0
|
exit 0
|
||||||
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
|
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
|
||||||
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
|
echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****"
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/buildWithParameters?PACKAGE_CHECK=false \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||||
echo "**** Sleeping 10 seconds until job starts ****"
|
echo "**** Sleeping 10 seconds until job starts ****"
|
||||||
|
4
.github/workflows/greetings.yml
vendored
4
.github/workflows/greetings.yml
vendored
@ -8,6 +8,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/first-interaction@v1
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
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!'
|
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!'
|
||||||
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)!'
|
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)!'
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
14
.github/workflows/package_trigger.yml
vendored
14
.github/workflows/package_trigger.yml
vendored
@ -4,25 +4,25 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package-trigger-master:
|
package-trigger-focal:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.3
|
- uses: actions/checkout@v2.3.3
|
||||||
|
|
||||||
- name: Package Trigger
|
- name: Package Trigger
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/focal'
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
|
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_FOCAL }}" ]; then
|
||||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
|
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_FOCAL is set; skipping trigger. ****"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
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
|
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
|
||||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\". ****"
|
echo "**** Package trigger running off of focal branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_CODE_SERVER_FOCAL\". ****"
|
||||||
response=$(curl -iX POST \
|
response=$(curl -iX POST \
|
||||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/buildWithParameters?PACKAGE_CHECK=true \
|
||||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||||
echo "**** Sleeping 10 seconds until job starts ****"
|
echo "**** Sleeping 10 seconds until job starts ****"
|
||||||
|
11
Dockerfile
11
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -16,7 +16,7 @@ RUN \
|
|||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
gnupg && \
|
gnupg && \
|
||||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
echo 'deb https://deb.nodesource.com/node_14.x bionic main' \
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
||||||
> /etc/apt/sources.list.d/nodesource.list && \
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
||||||
@ -25,10 +25,11 @@ RUN \
|
|||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
libsecret-1-dev \
|
||||||
libx11-dev \
|
libx11-dev \
|
||||||
libxkbfile-dev \
|
libxkbfile-dev \
|
||||||
libsecret-1-dev \
|
pkg-config \
|
||||||
pkg-config && \
|
python3 && \
|
||||||
echo "**** install runtime dependencies ****" && \
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
@ -44,6 +45,7 @@ RUN \
|
|||||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
|
npm config set python python3 \
|
||||||
yarn config set network-timeout 600000 -g && \
|
yarn config set network-timeout 600000 -g && \
|
||||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||||
yarn cache clean && \
|
yarn cache clean && \
|
||||||
@ -56,6 +58,7 @@ RUN \
|
|||||||
pkg-config && \
|
pkg-config && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -16,7 +16,7 @@ RUN \
|
|||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
gnupg && \
|
gnupg && \
|
||||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
echo 'deb https://deb.nodesource.com/node_14.x bionic main' \
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
||||||
> /etc/apt/sources.list.d/nodesource.list && \
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
||||||
@ -25,10 +25,11 @@ RUN \
|
|||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
libsecret-1-dev \
|
||||||
libx11-dev \
|
libx11-dev \
|
||||||
libxkbfile-dev \
|
libxkbfile-dev \
|
||||||
libsecret-1-dev \
|
pkg-config \
|
||||||
pkg-config && \
|
python3 && \
|
||||||
echo "**** install runtime dependencies ****" && \
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
@ -44,6 +45,7 @@ RUN \
|
|||||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
|
npm config set python python3 \
|
||||||
yarn config set network-timeout 600000 -g && \
|
yarn config set network-timeout 600000 -g && \
|
||||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||||
yarn cache clean && \
|
yarn cache clean && \
|
||||||
@ -56,6 +58,7 @@ RUN \
|
|||||||
pkg-config && \
|
pkg-config && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -16,7 +16,7 @@ RUN \
|
|||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
gnupg && \
|
gnupg && \
|
||||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||||
echo 'deb https://deb.nodesource.com/node_14.x bionic main' \
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
||||||
> /etc/apt/sources.list.d/nodesource.list && \
|
> /etc/apt/sources.list.d/nodesource.list && \
|
||||||
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||||
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
||||||
@ -25,10 +25,11 @@ RUN \
|
|||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
libsecret-1-dev \
|
||||||
libx11-dev \
|
libx11-dev \
|
||||||
libxkbfile-dev \
|
libxkbfile-dev \
|
||||||
libsecret-1-dev \
|
pkg-config \
|
||||||
pkg-config && \
|
python3 && \
|
||||||
echo "**** install runtime dependencies ****" && \
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
@ -44,6 +45,7 @@ RUN \
|
|||||||
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
||||||
fi && \
|
fi && \
|
||||||
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
||||||
|
npm config set python python3 \
|
||||||
yarn config set network-timeout 600000 -g && \
|
yarn config set network-timeout 600000 -g && \
|
||||||
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
||||||
yarn cache clean && \
|
yarn cache clean && \
|
||||||
@ -56,6 +58,7 @@ RUN \
|
|||||||
pkg-config && \
|
pkg-config && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
153
Jenkinsfile
vendored
153
Jenkinsfile
vendored
@ -16,6 +16,7 @@ pipeline {
|
|||||||
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
||||||
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
||||||
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||||
|
SCARF_TOKEN=credentials('scarf_api_key')
|
||||||
CONTAINER_NAME = 'code-server'
|
CONTAINER_NAME = 'code-server'
|
||||||
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
LS_USER = 'linuxserver'
|
LS_USER = 'linuxserver'
|
||||||
@ -116,13 +117,30 @@ pipeline {
|
|||||||
env.EXT_RELEASE_CLEAN = sh(
|
env.EXT_RELEASE_CLEAN = sh(
|
||||||
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
|
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
|
||||||
returnStdout: true).trim()
|
returnStdout: true).trim()
|
||||||
|
|
||||||
|
env.SEMVER = (new Date()).format('YYYY.MM.dd')
|
||||||
|
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)$/
|
||||||
|
if (semver.find()) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||||
|
} else {
|
||||||
|
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)$/
|
||||||
|
if (semver.find()) {
|
||||||
|
if (semver[0][3]) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
|
||||||
|
} else if (!semver[0][3] && !semver[0][4]) {
|
||||||
|
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${(new Date()).format('YYYYMMdd')}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println("SEMVER: ${env.SEMVER}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If this is a master build use live docker endpoints
|
// If this is a focal build use live docker endpoints
|
||||||
stage("Set ENV live build"){
|
stage("Set ENV live build"){
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -130,6 +148,7 @@ pipeline {
|
|||||||
env.IMAGE = env.DOCKERHUB_IMAGE
|
env.IMAGE = env.DOCKERHUB_IMAGE
|
||||||
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME
|
||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
||||||
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
} else {
|
} else {
|
||||||
@ -144,7 +163,7 @@ pipeline {
|
|||||||
// If this is a dev build use dev docker endpoints
|
// If this is a dev build use dev docker endpoints
|
||||||
stage("Set ENV dev build"){
|
stage("Set ENV dev build"){
|
||||||
when {
|
when {
|
||||||
not {branch "master"}
|
not {branch "focal"}
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -152,6 +171,7 @@ pipeline {
|
|||||||
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
|
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
|
||||||
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME
|
||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
||||||
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||||
} else {
|
} else {
|
||||||
@ -174,6 +194,7 @@ pipeline {
|
|||||||
env.IMAGE = env.PR_DOCKERHUB_IMAGE
|
env.IMAGE = env.PR_DOCKERHUB_IMAGE
|
||||||
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME
|
env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME
|
||||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||||
|
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||||
if (env.MULTIARCH == 'true') {
|
if (env.MULTIARCH == 'true') {
|
||||||
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||||
} else {
|
} else {
|
||||||
@ -219,7 +240,7 @@ pipeline {
|
|||||||
// Use helper containers to render templated files
|
// Use helper containers to render templated files
|
||||||
stage('Update-Templates') {
|
stage('Update-Templates') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
expression {
|
expression {
|
||||||
env.CONTAINER_NAME != null
|
env.CONTAINER_NAME != null
|
||||||
@ -230,13 +251,13 @@ pipeline {
|
|||||||
set -e
|
set -e
|
||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=focal -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||||
# Stage 1 - Jenkinsfile update
|
# Stage 1 - Jenkinsfile update
|
||||||
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f focal
|
||||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||||
git add Jenkinsfile
|
git add Jenkinsfile
|
||||||
git commit -m 'Bot Updating Templated Files'
|
git commit -m 'Bot Updating Templated Files'
|
||||||
@ -259,7 +280,7 @@ pipeline {
|
|||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f focal
|
||||||
for i in ${TEMPLATES_TO_DELETE}; do
|
for i in ${TEMPLATES_TO_DELETE}; do
|
||||||
git rm "${i}"
|
git rm "${i}"
|
||||||
done
|
done
|
||||||
@ -280,7 +301,7 @@ pipeline {
|
|||||||
mkdir -p ${TEMPDIR}/repo
|
mkdir -p ${TEMPDIR}/repo
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||||
git checkout -f master
|
git checkout -f focal
|
||||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||||
@ -336,7 +357,7 @@ pipeline {
|
|||||||
// Exit the build if the Templated files were just updated
|
// Exit the build if the Templated files were just updated
|
||||||
stage('Template-exit') {
|
stage('Template-exit') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'FILES_UPDATED', value: 'true'
|
environment name: 'FILES_UPDATED', value: 'true'
|
||||||
expression {
|
expression {
|
||||||
@ -369,13 +390,57 @@ pipeline {
|
|||||||
"visibility":"public"}' '''
|
"visibility":"public"}' '''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* #######################
|
||||||
|
Scarf.sh package registry
|
||||||
|
####################### */
|
||||||
|
// Add package to Scarf.sh and set permissions
|
||||||
|
stage("Scarf.sh package registry"){
|
||||||
|
when {
|
||||||
|
branch "focal"
|
||||||
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
|
}
|
||||||
|
steps{
|
||||||
|
sh '''#! /bin/bash
|
||||||
|
set -e
|
||||||
|
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/packages | jq -r '.[] | select(.name=="linuxserver/code-server") | .uuid')
|
||||||
|
if [ -z "${PACKAGE_UUID}" ]; then
|
||||||
|
echo "Adding package to Scarf.sh"
|
||||||
|
PACKAGE_UUID=$(curl -sX POST https://scarf.sh/api/v1/packages \
|
||||||
|
-H "Authorization: Bearer ${SCARF_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"name":"linuxserver/code-server",\
|
||||||
|
"shortDescription":"example description",\
|
||||||
|
"libraryType":"docker",\
|
||||||
|
"website":"https://github.com/linuxserver/docker-code-server",\
|
||||||
|
"backendUrl":"https://ghcr.io/linuxserver/code-server",\
|
||||||
|
"publicUrl":"https://lscr.io/linuxserver/code-server"}' \
|
||||||
|
| jq -r .uuid)
|
||||||
|
else
|
||||||
|
echo "Package already exists on Scarf.sh"
|
||||||
|
fi
|
||||||
|
echo "Setting permissions on Scarf.sh for package ${PACKAGE_UUID}"
|
||||||
|
curl -X POST https://scarf.sh/api/v1/packages/${PACKAGE_UUID}/permissions \
|
||||||
|
-H "Authorization: Bearer ${SCARF_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '[{"userQuery":"Spad","permissionLevel":"admin"},\
|
||||||
|
{"userQuery":"roxedus","permissionLevel":"admin"},\
|
||||||
|
{"userQuery":"nemchik","permissionLevel":"admin"},\
|
||||||
|
{"userQuery":"driz","permissionLevel":"admin"},\
|
||||||
|
{"userQuery":"aptalca","permissionLevel":"admin"},\
|
||||||
|
{"userQuery":"saarg","permissionLevel":"admin"},\
|
||||||
|
{"userQuery":"Stark","permissionLevel":"admin"}]'
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
/* ###############
|
/* ###############
|
||||||
Build Container
|
Build Container
|
||||||
############### */
|
############### */
|
||||||
// Build Docker container for push to LS Repo
|
// Build Docker container for push to LS Repo
|
||||||
stage('Build-Single') {
|
stage('Build-Single') {
|
||||||
when {
|
when {
|
||||||
environment name: 'MULTIARCH', value: 'false'
|
expression {
|
||||||
|
env.MULTIARCH == 'false' || params.PACKAGE_CHECK == 'true'
|
||||||
|
}
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
@ -400,7 +465,10 @@ pipeline {
|
|||||||
// Build MultiArch Docker containers for push to LS Repo
|
// Build MultiArch Docker containers for push to LS Repo
|
||||||
stage('Build-Multi') {
|
stage('Build-Multi') {
|
||||||
when {
|
when {
|
||||||
environment name: 'MULTIARCH', value: 'true'
|
allOf {
|
||||||
|
environment name: 'MULTIARCH', value: 'true'
|
||||||
|
expression { params.PACKAGE_CHECK == 'false' }
|
||||||
|
}
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
parallel {
|
parallel {
|
||||||
@ -497,7 +565,7 @@ pipeline {
|
|||||||
// Take the image we just built and dump package versions for comparison
|
// Take the image we just built and dump package versions for comparison
|
||||||
stage('Update-packages') {
|
stage('Update-packages') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
}
|
}
|
||||||
@ -505,7 +573,7 @@ pipeline {
|
|||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
TEMPDIR=$(mktemp -d)
|
TEMPDIR=$(mktemp -d)
|
||||||
if [ "${MULTIARCH}" == "true" ]; then
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
||||||
else
|
else
|
||||||
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
||||||
@ -534,7 +602,7 @@ pipeline {
|
|||||||
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||||
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
|
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f focal
|
||||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||||
cd ${TEMPDIR}/${LS_REPO}/
|
cd ${TEMPDIR}/${LS_REPO}/
|
||||||
wait
|
wait
|
||||||
@ -558,7 +626,7 @@ pipeline {
|
|||||||
// Exit the build if the package file was just updated
|
// Exit the build if the package file was just updated
|
||||||
stage('PACKAGE-exit') {
|
stage('PACKAGE-exit') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
@ -566,7 +634,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "Packages were updated. Cleaning up the image and exiting."
|
echo "Packages were updated. Cleaning up the image and exiting."
|
||||||
if [ "${MULTIARCH}" == "true" ]; then
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||||
else
|
else
|
||||||
docker rmi ${IMAGE}:${META_TAG}
|
docker rmi ${IMAGE}:${META_TAG}
|
||||||
@ -579,7 +647,7 @@ pipeline {
|
|||||||
// Exit the build if this is just a package check and there are no changes to push
|
// Exit the build if this is just a package check and there are no changes to push
|
||||||
stage('PACKAGECHECK-exit') {
|
stage('PACKAGECHECK-exit') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
environment name: 'CHANGE_ID', value: ''
|
environment name: 'CHANGE_ID', value: ''
|
||||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||||
environment name: 'EXIT_STATUS', value: ''
|
environment name: 'EXIT_STATUS', value: ''
|
||||||
@ -590,7 +658,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "There are no package updates. Cleaning up the image and exiting."
|
echo "There are no package updates. Cleaning up the image and exiting."
|
||||||
if [ "${MULTIARCH}" == "true" ]; then
|
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
|
||||||
docker rmi ${IMAGE}:amd64-${META_TAG}
|
docker rmi ${IMAGE}:amd64-${META_TAG}
|
||||||
else
|
else
|
||||||
docker rmi ${IMAGE}:${META_TAG}
|
docker rmi ${IMAGE}:${META_TAG}
|
||||||
@ -665,6 +733,12 @@ pipeline {
|
|||||||
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
||||||
usernameVariable: 'DOCKERUSER',
|
usernameVariable: 'DOCKERUSER',
|
||||||
passwordVariable: 'DOCKERPASS'
|
passwordVariable: 'DOCKERPASS'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: 'Quay.io-Robot',
|
||||||
|
usernameVariable: 'QUAYUSER',
|
||||||
|
passwordVariable: 'QUAYPASS'
|
||||||
]
|
]
|
||||||
]) {
|
]) {
|
||||||
retry(5) {
|
retry(5) {
|
||||||
@ -673,22 +747,26 @@ pipeline {
|
|||||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||||
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||||
|
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
||||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||||
docker push ${PUSHIMAGE}:latest
|
docker push ${PUSHIMAGE}:latest
|
||||||
docker push ${PUSHIMAGE}:${META_TAG}
|
docker push ${PUSHIMAGE}:${META_TAG}
|
||||||
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
docker push ${PUSHIMAGE}:${SEMVER}
|
||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:${META_TAG} \
|
${DELETEIMAGE}:${META_TAG} \
|
||||||
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
||||||
${DELETEIMAGE}:latest || :
|
${DELETEIMAGE}:latest \
|
||||||
|
${DELETEIMAGE}:${SEMVER} || :
|
||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@ -707,6 +785,12 @@ pipeline {
|
|||||||
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
|
||||||
usernameVariable: 'DOCKERUSER',
|
usernameVariable: 'DOCKERUSER',
|
||||||
passwordVariable: 'DOCKERPASS'
|
passwordVariable: 'DOCKERPASS'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$class: 'UsernamePasswordMultiBinding',
|
||||||
|
credentialsId: 'Quay.io-Robot',
|
||||||
|
usernameVariable: 'QUAYUSER',
|
||||||
|
passwordVariable: 'QUAYPASS'
|
||||||
]
|
]
|
||||||
]) {
|
]) {
|
||||||
retry(5) {
|
retry(5) {
|
||||||
@ -715,13 +799,14 @@ pipeline {
|
|||||||
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
|
||||||
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
|
||||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||||
|
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||||
if [ "${CI}" == "false" ]; then
|
if [ "${CI}" == "false" ]; then
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||||
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
|
||||||
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
|
||||||
fi
|
fi
|
||||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}"; do
|
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
@ -731,6 +816,9 @@ pipeline {
|
|||||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||||
|
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||||
@ -740,6 +828,9 @@ pipeline {
|
|||||||
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||||
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
|
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||||
|
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
|
||||||
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest
|
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm
|
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm
|
||||||
@ -752,24 +843,32 @@ pipeline {
|
|||||||
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
|
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm
|
||||||
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
|
||||||
|
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
|
||||||
|
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||||
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||||
|
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
|
||||||
done
|
done
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||||
docker rmi \
|
docker rmi \
|
||||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||||
${DELETEIMAGE}:amd64-latest \
|
${DELETEIMAGE}:amd64-latest \
|
||||||
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
|
||||||
|
${DELETEIMAGE}:amd64-${SEMVER} \
|
||||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm32v7-latest \
|
${DELETEIMAGE}:arm32v7-latest \
|
||||||
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
||||||
|
${DELETEIMAGE}:arm32v7-${SEMVER} \
|
||||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||||
${DELETEIMAGE}:arm64v8-latest \
|
${DELETEIMAGE}:arm64v8-latest \
|
||||||
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} \
|
||||||
|
${DELETEIMAGE}:arm64v8-${SEMVER} || :
|
||||||
done
|
done
|
||||||
docker rmi \
|
docker rmi \
|
||||||
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||||
@ -781,7 +880,7 @@ pipeline {
|
|||||||
// If this is a public release tag it in the LS Github
|
// If this is a public release tag it in the LS Github
|
||||||
stage('Github-Tag-Push-Release') {
|
stage('Github-Tag-Push-Release') {
|
||||||
when {
|
when {
|
||||||
branch "master"
|
branch "focal"
|
||||||
expression {
|
expression {
|
||||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||||
}
|
}
|
||||||
@ -793,14 +892,14 @@ pipeline {
|
|||||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||||
-d '{"tag":"'${META_TAG}'",\
|
-d '{"tag":"'${META_TAG}'",\
|
||||||
"object": "'${COMMIT_SHA}'",\
|
"object": "'${COMMIT_SHA}'",\
|
||||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to focal",\
|
||||||
"type": "commit",\
|
"type": "commit",\
|
||||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||||
echo "Pushing New release for Tag"
|
echo "Pushing New release for Tag"
|
||||||
sh '''#! /bin/bash
|
sh '''#! /bin/bash
|
||||||
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||||
echo '{"tag_name":"'${META_TAG}'",\
|
echo '{"tag_name":"'${META_TAG}'",\
|
||||||
"target_commitish": "master",\
|
"target_commitish": "focal",\
|
||||||
"name": "'${META_TAG}'",\
|
"name": "'${META_TAG}'",\
|
||||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
|
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
|
||||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||||
|
20
README.md
20
README.md
@ -1,5 +1,5 @@
|
|||||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||||
<!-- Please read the https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md -->
|
<!-- Please read the https://github.com/linuxserver/docker-code-server/blob/focal/.github/CONTRIBUTING.md -->
|
||||||
|
|
||||||
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
|
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
|
||||||
|
|
||||||
@ -33,9 +33,10 @@ Find us at:
|
|||||||
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-code-server/releases)
|
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-code-server/releases)
|
||||||
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-code-server/packages)
|
[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-code-server/packages)
|
||||||
[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-code-server/container_registry)
|
[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-code-server/container_registry)
|
||||||
|
[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/code-server)
|
||||||
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/code-server)
|
[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/code-server)
|
||||||
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/code-server)
|
[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/code-server)
|
||||||
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-code-server%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/)
|
[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-code-server%2Fjob%2Ffocal%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/focal/)
|
||||||
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fcode-server%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/code-server/latest/index.html)
|
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fcode-server%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/code-server/latest/index.html)
|
||||||
|
|
||||||
[Code-server](https://coder.com) is VS Code running on a remote server, accessible through the browser.
|
[Code-server](https://coder.com) is VS Code running on a remote server, accessible through the browser.
|
||||||
@ -52,7 +53,7 @@ Find us at:
|
|||||||
|
|
||||||
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
|
||||||
|
|
||||||
Simply pulling `ghcr.io/linuxserver/code-server` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
Simply pulling `lscr.io/linuxserver/code-server` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||||
|
|
||||||
The architectures supported by this image are:
|
The architectures supported by this image are:
|
||||||
|
|
||||||
@ -69,7 +70,7 @@ This image provides various versions that are available via tags. `latest` tag u
|
|||||||
| Tag | Description |
|
| Tag | Description |
|
||||||
| :----: | --- |
|
| :----: | --- |
|
||||||
| latest | Stable releases |
|
| latest | Stable releases |
|
||||||
| development | DEPRECATED (no longer updated) - Prereleases from their GitHub |
|
| focal | Stable releases, on a focal baseiamge |
|
||||||
|
|
||||||
## Application Setup
|
## Application Setup
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ Here are some example snippets to help you get started creating a container.
|
|||||||
version: "2.1"
|
version: "2.1"
|
||||||
services:
|
services:
|
||||||
code-server:
|
code-server:
|
||||||
image: ghcr.io/linuxserver/code-server
|
image: lscr.io/linuxserver/code-server
|
||||||
container_name: code-server
|
container_name: code-server
|
||||||
environment:
|
environment:
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
@ -131,7 +132,7 @@ docker run -d \
|
|||||||
-p 8443:8443 \
|
-p 8443:8443 \
|
||||||
-v /path/to/appdata/config:/config \
|
-v /path/to/appdata/config:/config \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
ghcr.io/linuxserver/code-server
|
lscr.io/linuxserver/code-server
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
@ -194,7 +195,7 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
|
|||||||
* container version number
|
* container version number
|
||||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server`
|
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server`
|
||||||
* image version number
|
* image version number
|
||||||
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' ghcr.io/linuxserver/code-server`
|
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/code-server`
|
||||||
|
|
||||||
## Updating Info
|
## Updating Info
|
||||||
|
|
||||||
@ -212,7 +213,7 @@ Below are the instructions for updating containers:
|
|||||||
|
|
||||||
### Via Docker Run
|
### Via Docker Run
|
||||||
|
|
||||||
* Update the image: `docker pull ghcr.io/linuxserver/code-server`
|
* Update the image: `docker pull lscr.io/linuxserver/code-server`
|
||||||
* Stop the running container: `docker stop code-server`
|
* Stop the running container: `docker stop code-server`
|
||||||
* Delete the container: `docker rm code-server`
|
* Delete the container: `docker rm code-server`
|
||||||
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
|
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
|
||||||
@ -247,7 +248,7 @@ cd docker-code-server
|
|||||||
docker build \
|
docker build \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--pull \
|
--pull \
|
||||||
-t ghcr.io/linuxserver/code-server:latest .
|
-t lscr.io/linuxserver/code-server:latest .
|
||||||
```
|
```
|
||||||
|
|
||||||
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
|
||||||
@ -260,6 +261,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **12.07.21:** - Rebase to focal
|
||||||
* **11.07.21:** - Bump node to 14 to fix builds
|
* **11.07.21:** - Bump node to 14 to fix builds
|
||||||
* **08.05.21:** - Fix doc link
|
* **08.05.21:** - Fix doc link
|
||||||
* **04.02.20:** - Allow setting gui password via hash using env var `HASHED_PASSWORD`.
|
* **04.02.20:** - Allow setting gui password via hash using env var `HASHED_PASSWORD`.
|
||||||
|
@ -6,7 +6,7 @@ external_type: na
|
|||||||
custom_version_command: "curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '.\"dist-tags\".latest' | sed 's|^|v|'"
|
custom_version_command: "curl -sX GET https://registry.yarnpkg.com/code-server | jq -r '.\"dist-tags\".latest' | sed 's|^|v|'"
|
||||||
release_type: stable
|
release_type: stable
|
||||||
release_tag: latest
|
release_tag: latest
|
||||||
ls_branch: master
|
ls_branch: focal
|
||||||
repo_vars:
|
repo_vars:
|
||||||
- CONTAINER_NAME = 'code-server'
|
- CONTAINER_NAME = 'code-server'
|
||||||
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||||
|
@ -29,7 +29,7 @@ available_architectures:
|
|||||||
development_versions: true
|
development_versions: true
|
||||||
development_versions_items:
|
development_versions_items:
|
||||||
- { tag: "latest", desc: "Stable releases" }
|
- { tag: "latest", desc: "Stable releases" }
|
||||||
- { tag: "development", desc: "DEPRECATED (no longer updated) - Prereleases from their GitHub" }
|
- { tag: "focal", desc: "Stable releases, on a focal baseiamge" }
|
||||||
|
|
||||||
# container parameters
|
# container parameters
|
||||||
common_param_env_vars_enabled: true
|
common_param_env_vars_enabled: true
|
||||||
@ -75,6 +75,7 @@ app_setup_block: |
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "12.07.21:", desc: "Rebase to focal" }
|
||||||
- { date: "11.07.21:", desc: "Bump node to 14 to fix builds" }
|
- { date: "11.07.21:", desc: "Bump node to 14 to fix builds" }
|
||||||
- { date: "08.05.21:", desc: "Fix doc link" }
|
- { date: "08.05.21:", desc: "Fix doc link" }
|
||||||
- { date: "04.02.20:", desc: "Allow setting gui password via hash using env var `HASHED_PASSWORD`." }
|
- { date: "04.02.20:", desc: "Allow setting gui password via hash using env var `HASHED_PASSWORD`." }
|
||||||
|
Loading…
Reference in New Issue
Block a user