mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-26 22:15:41 +01:00
initial commit of mod-python2
This commit is contained in:
parent
a9346cfc98
commit
2e4bca6e45
36
Dockerfile
36
Dockerfile
@ -1,44 +1,10 @@
|
||||
FROM lsiobase/ubuntu:bionic
|
||||
FROM scratch
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG CODE_RELEASE
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
LABEL maintainer="aptalca"
|
||||
|
||||
# environment settings
|
||||
ENV HOME="/config"
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
git \
|
||||
jq \
|
||||
nano \
|
||||
net-tools \
|
||||
sudo && \
|
||||
echo "**** install code-server ****" && \
|
||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
||||
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
||||
fi && \
|
||||
CODE_URL=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/tags/${CODE_RELEASE}" \
|
||||
| jq -r '.assets[] | select(.browser_download_url | contains("linux-x86_64")) | .browser_download_url') && \
|
||||
curl -o \
|
||||
/tmp/code.tar.gz -L \
|
||||
"${CODE_URL}" && \
|
||||
tar xzf /tmp/code.tar.gz -C \
|
||||
/usr/bin/ --strip-components=1 \
|
||||
--wildcards code-server*/code-server && \
|
||||
echo "**** clean up ****" && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY /root /
|
||||
|
||||
# ports and volumes
|
||||
EXPOSE 8443
|
||||
|
194
Jenkinsfile
vendored
194
Jenkinsfile
vendored
@ -16,9 +16,6 @@ pipeline {
|
||||
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
|
||||
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
|
||||
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
|
||||
EXT_GIT_BRANCH = 'master'
|
||||
EXT_USER = 'cdr'
|
||||
EXT_REPO = 'code-server'
|
||||
CONTAINER_NAME = 'code-server'
|
||||
BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||
LS_USER = 'linuxserver'
|
||||
@ -28,14 +25,7 @@ pipeline {
|
||||
PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
||||
DIST_IMAGE = 'ubuntu'
|
||||
MULTIARCH='false'
|
||||
CI='true'
|
||||
CI_WEB='true'
|
||||
CI_PORT='8443'
|
||||
CI_SSL='false'
|
||||
CI_DELAY='120'
|
||||
CI_DOCKERENV='TZ=US/Pacific'
|
||||
CI_AUTH='user:password'
|
||||
CI_WEBPATH=''
|
||||
CI='false'
|
||||
}
|
||||
stages {
|
||||
// Setup all the basic environment variables needed for the build
|
||||
@ -44,7 +34,7 @@ pipeline {
|
||||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.LS_RELEASE = sh(
|
||||
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':mod-python2 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
returnStdout: true).trim()
|
||||
env.LS_RELEASE_NOTES = sh(
|
||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||
@ -101,23 +91,14 @@ pipeline {
|
||||
/* ########################
|
||||
External Release Tagging
|
||||
######################## */
|
||||
// If this is a stable github release use the latest endpoint from github to determine the ext tag
|
||||
stage("Set ENV github_stable"){
|
||||
steps{
|
||||
script{
|
||||
env.EXT_RELEASE = sh(
|
||||
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
|
||||
returnStdout: true).trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a stable or devel github release generate the link for the build message
|
||||
stage("Set ENV github_link"){
|
||||
steps{
|
||||
script{
|
||||
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
|
||||
}
|
||||
}
|
||||
// If this is an os release set release type to none to indicate no external release
|
||||
stage("Set ENV os"){
|
||||
steps{
|
||||
script{
|
||||
env.EXT_RELEASE = env.PACKAGE_TAG
|
||||
env.RELEASE_LINK = 'none'
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sanitize the release tag and strip illegal docker or github characters
|
||||
stage("Sanitize tag"){
|
||||
@ -129,10 +110,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a master build use live docker endpoints
|
||||
// If this is a mod-python2 build use live docker endpoints
|
||||
stage("Set ENV live build"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "mod-python2"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@ -153,7 +134,7 @@ pipeline {
|
||||
// If this is a dev build use dev docker endpoints
|
||||
stage("Set ENV dev build"){
|
||||
when {
|
||||
not {branch "master"}
|
||||
not {branch "mod-python2"}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@ -226,7 +207,7 @@ pipeline {
|
||||
// Use helper containers to render templated files
|
||||
stage('Update-Templates') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "mod-python2"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
expression {
|
||||
env.CONTAINER_NAME != null
|
||||
@ -237,7 +218,7 @@ pipeline {
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=mod-python2 -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
|
||||
CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8)
|
||||
@ -245,7 +226,7 @@ pipeline {
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f mod-python2
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
|
||||
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
|
||||
@ -277,7 +258,7 @@ pipeline {
|
||||
// Exit the build if the Templated files were just updated
|
||||
stage('Template-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "mod-python2"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'FILES_UPDATED', value: 'true'
|
||||
expression {
|
||||
@ -393,89 +374,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Take the image we just built and dump package versions for comparison
|
||||
stage('Update-packages') {
|
||||
when {
|
||||
branch "master"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
if [ "${MULTIARCH}" == "true" ]; then
|
||||
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
|
||||
else
|
||||
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
|
||||
fi
|
||||
if [ "${DIST_IMAGE}" == "alpine" ]; then
|
||||
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||
apk info -v > /tmp/package_versions.txt && \
|
||||
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||
chmod 777 /tmp/package_versions.txt'
|
||||
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
|
||||
docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
|
||||
apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
|
||||
sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
|
||||
chmod 777 /tmp/package_versions.txt'
|
||||
fi
|
||||
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
|
||||
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
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
|
||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||
cd ${TEMPDIR}/${LS_REPO}/
|
||||
wait
|
||||
git add package_versions.txt
|
||||
git commit -m 'Bot Updating Package Versions'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Package tag updated, stopping build process"
|
||||
else
|
||||
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Package tag is same as previous continue with build process"
|
||||
fi
|
||||
rm -Rf ${TEMPDIR}'''
|
||||
script{
|
||||
env.PACKAGE_UPDATED = sh(
|
||||
script: '''cat /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}''',
|
||||
returnStdout: true).trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Exit the build if the package file was just updated
|
||||
stage('PACKAGE-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
env.EXIT_STATUS = 'ABORTED'
|
||||
}
|
||||
}
|
||||
}
|
||||
// Exit the build if this is just a package check and there are no changes to push
|
||||
stage('PACKAGECHECK-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
expression {
|
||||
params.PACKAGE_CHECK == 'true'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
env.EXIT_STATUS = 'ABORTED'
|
||||
}
|
||||
}
|
||||
}
|
||||
/* #######
|
||||
Testing
|
||||
####### */
|
||||
@ -557,14 +455,14 @@ pipeline {
|
||||
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
|
||||
for PUSHIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest
|
||||
docker push ${PUSHIMAGE}:latest
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:mod-python2
|
||||
docker push ${PUSHIMAGE}:mod-python2
|
||||
docker push ${PUSHIMAGE}:${META_TAG}
|
||||
done
|
||||
for DELETEIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "{GITLABIMAGE}" "${IMAGE}"; do
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:${META_TAG} \
|
||||
${DELETEIMAGE}:latest || :
|
||||
${DELETEIMAGE}:mod-python2 || :
|
||||
done
|
||||
'''
|
||||
}
|
||||
@ -607,52 +505,52 @@ pipeline {
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-mod-python2
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-mod-python2
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-mod-python2
|
||||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-latest
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-latest
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-latest
|
||||
docker manifest push --purge ${MANIFESTIMAGE}: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}:arm64v8-latest --os linux --arch arm64 --variant v8
|
||||
docker push ${MANIFESTIMAGE}:amd64-mod-python2
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-mod-python2
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-mod-python2
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:mod-python2 || :
|
||||
docker manifest create ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:amd64-mod-python2 ${MANIFESTIMAGE}:arm32v7-mod-python2 ${MANIFESTIMAGE}:arm64v8-mod-python2
|
||||
docker manifest annotate ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:arm32v7-mod-python2 --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:mod-python2 ${MANIFESTIMAGE}:arm64v8-mod-python2 --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:latest
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:mod-python2
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||
done
|
||||
for LEGACYIMAGE in "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
docker tag ${IMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:amd64-${META_TAG}
|
||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:latest
|
||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:mod-python2
|
||||
docker tag ${LEGACYIMAGE}:amd64-${META_TAG} ${LEGACYIMAGE}:${META_TAG}
|
||||
docker tag ${LEGACYIMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-latest
|
||||
docker tag ${LEGACYIMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-latest
|
||||
docker tag ${LEGACYIMAGE}:arm32v7-${META_TAG} ${LEGACYIMAGE}:arm32v7-mod-python2
|
||||
docker tag ${LEGACYIMAGE}:arm64v8-${META_TAG} ${LEGACYIMAGE}:arm64v8-mod-python2
|
||||
docker push ${LEGACYIMAGE}:amd64-${META_TAG}
|
||||
docker push ${LEGACYIMAGE}:arm32v7-${META_TAG}
|
||||
docker push ${LEGACYIMAGE}:arm64v8-${META_TAG}
|
||||
docker push ${LEGACYIMAGE}:latest
|
||||
docker push ${LEGACYIMAGE}:mod-python2
|
||||
docker push ${LEGACYIMAGE}:${META_TAG}
|
||||
docker push ${LEGACYIMAGE}:arm32v7-latest
|
||||
docker push ${LEGACYIMAGE}:arm64v8-latest
|
||||
docker push ${LEGACYIMAGE}:arm32v7-mod-python2
|
||||
docker push ${LEGACYIMAGE}:arm64v8-mod-python2
|
||||
done
|
||||
'''
|
||||
sh '''#! /bin/bash
|
||||
for DELETEIMAGE in "${QUAYIMAGE}" "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:amd64-${META_TAG} \
|
||||
${DELETEIMAGE}:amd64-latest \
|
||||
${DELETEIMAGE}:amd64-mod-python2 \
|
||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||
${DELETEIMAGE}:arm32v7-latest \
|
||||
${DELETEIMAGE}:arm32v7-mod-python2 \
|
||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-latest || :
|
||||
${DELETEIMAGE}:arm64v8-mod-python2 || :
|
||||
done
|
||||
docker rmi \
|
||||
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
|
||||
@ -664,7 +562,7 @@ pipeline {
|
||||
// If this is a public release tag it in the LS Github
|
||||
stage('Github-Tag-Push-Release') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "mod-python2"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
@ -676,17 +574,17 @@ pipeline {
|
||||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"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 mod-python2",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
|
||||
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
|
||||
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"target_commitish": "master",\
|
||||
"target_commitish": "mod-python2",\
|
||||
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": true}' >> releasebody.json
|
||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||
}
|
||||
|
@ -229,6 +229,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **28.01.20:** - Release python2-mod.
|
||||
* **17.01.20:** - Fix artifact url retrieval from github.
|
||||
* **24.10.19:** - Upgrade to v2 builds.
|
||||
* **28.09.19:** - Update project logo.
|
||||
|
@ -2,14 +2,12 @@
|
||||
|
||||
# jenkins variables
|
||||
project_name: docker-code-server
|
||||
external_type: github_stable
|
||||
release_type: stable
|
||||
release_tag: latest
|
||||
ls_branch: master
|
||||
external_type: os
|
||||
release_type: prerelease
|
||||
release_tag: mod-python2
|
||||
ls_branch: mod-python2
|
||||
skip_package_check: true
|
||||
repo_vars:
|
||||
- EXT_GIT_BRANCH = 'master'
|
||||
- EXT_USER = 'cdr'
|
||||
- EXT_REPO = 'code-server'
|
||||
- CONTAINER_NAME = 'code-server'
|
||||
- BUILD_VERSION_ARG = 'CODE_RELEASE'
|
||||
- LS_USER = 'linuxserver'
|
||||
@ -19,11 +17,4 @@ repo_vars:
|
||||
- PR_DOCKERHUB_IMAGE = 'lspipepr/code-server'
|
||||
- DIST_IMAGE = 'ubuntu'
|
||||
- MULTIARCH='false'
|
||||
- CI='true'
|
||||
- CI_WEB='true'
|
||||
- CI_PORT='8443'
|
||||
- CI_SSL='false'
|
||||
- CI_DELAY='120'
|
||||
- CI_DOCKERENV='TZ=US/Pacific'
|
||||
- CI_AUTH='user:password'
|
||||
- CI_WEBPATH=''
|
||||
- CI='false'
|
||||
|
@ -1,155 +0,0 @@
|
||||
adduser3.116ubuntu1
|
||||
apt1.6.12
|
||||
apt-utils1.6.12
|
||||
base-files10.1ubuntu2.7
|
||||
base-passwd3.5.44
|
||||
bash4.4.18-2ubuntu1.2
|
||||
bsdutils1:2.31.1-0.4ubuntu3.4
|
||||
bzip21.0.6-8.1ubuntu0.2
|
||||
ca-certificates20180409
|
||||
coreutils8.28-1ubuntu1
|
||||
curl7.58.0-2ubuntu3.8
|
||||
dash0.5.8-2.10
|
||||
debconf1.5.66ubuntu1
|
||||
debianutils4.8.4
|
||||
diffutils1:3.6-1
|
||||
dpkg1.19.0.5ubuntu2.3
|
||||
e2fsprogs1.44.1-1ubuntu1.2
|
||||
fdisk2.31.1-0.4ubuntu3.4
|
||||
findutils4.6.0+git+20170828-2
|
||||
gcc-8-base8.3.0-6ubuntu1~18.04.1
|
||||
git1:2.17.1-1ubuntu0.5
|
||||
git-man1:2.17.1-1ubuntu0.5
|
||||
gpgv2.2.4-1ubuntu1.2
|
||||
grep3.1-2build1
|
||||
gzip1.6-5ubuntu1
|
||||
hostname3.20
|
||||
init-system-helpers1.51
|
||||
jq1.5+dfsg-2
|
||||
krb5-locales1.16-2ubuntu0.1
|
||||
less487-0.1
|
||||
libacl12.2.52-3build1
|
||||
libapt-inst2.01.6.12
|
||||
libapt-pkg5.01.6.12
|
||||
libasn1-8-heimdal7.5.0+dfsg-1
|
||||
libattr11:2.4.47-2build1
|
||||
libaudit11:2.8.2-1ubuntu1
|
||||
libaudit-common1:2.8.2-1ubuntu1
|
||||
libblkid12.31.1-0.4ubuntu3.4
|
||||
libbsd00.8.7-1ubuntu0.1
|
||||
libbz2-1.01.0.6-8.1ubuntu0.2
|
||||
libc62.27-3ubuntu1
|
||||
libcap-ng00.7.7-3.1
|
||||
libc-bin2.27-3ubuntu1
|
||||
libcom-err21.44.1-1ubuntu1.2
|
||||
libcurl3-gnutls7.58.0-2ubuntu3.8
|
||||
libcurl47.58.0-2ubuntu3.8
|
||||
libdb5.35.3.28-13.1ubuntu1.1
|
||||
libdebconfclient00.213ubuntu1
|
||||
libedit23.1-20170329-1
|
||||
liberror-perl0.17025-1
|
||||
libexpat12.2.5-3ubuntu0.2
|
||||
libext2fs21.44.1-1ubuntu1.2
|
||||
libfdisk12.31.1-0.4ubuntu3.4
|
||||
libffi63.2.1-8
|
||||
libgcc11:8.3.0-6ubuntu1~18.04.1
|
||||
libgcrypt201.8.1-4ubuntu1.2
|
||||
libgdbm51.14.1-6
|
||||
libgdbm-compat41.14.1-6
|
||||
libgmp102:6.1.2+dfsg-2
|
||||
libgnutls303.5.18-1ubuntu1.2
|
||||
libgpg-error01.27-6
|
||||
libgssapi3-heimdal7.5.0+dfsg-1
|
||||
libgssapi-krb5-21.16-2ubuntu0.1
|
||||
libhcrypto4-heimdal7.5.0+dfsg-1
|
||||
libheimbase1-heimdal7.5.0+dfsg-1
|
||||
libheimntlm0-heimdal7.5.0+dfsg-1
|
||||
libhogweed43.4-1
|
||||
libhx509-5-heimdal7.5.0+dfsg-1
|
||||
libidn2-02.0.4-1.1ubuntu0.2
|
||||
libjq11.5+dfsg-2
|
||||
libk5crypto31.16-2ubuntu0.1
|
||||
libkeyutils11.5.9-9.2ubuntu2
|
||||
libkrb5-26-heimdal7.5.0+dfsg-1
|
||||
libkrb5-31.16-2ubuntu0.1
|
||||
libkrb5support01.16-2ubuntu0.1
|
||||
libldap-2.4-22.4.45+dfsg-1ubuntu1.4
|
||||
libldap-common2.4.45+dfsg-1ubuntu1.4
|
||||
liblz4-10.0~r131-2ubuntu3
|
||||
liblzma55.2.2-1.3
|
||||
libmount12.31.1-0.4ubuntu3.4
|
||||
libncurses56.1-1ubuntu1.18.04
|
||||
libncursesw56.1-1ubuntu1.18.04
|
||||
libnettle63.4-1
|
||||
libnghttp2-141.30.0-1ubuntu1
|
||||
libonig46.7.0-1
|
||||
libp11-kit00.23.9-2
|
||||
libpam0g1.1.8-3.6ubuntu2.18.04.1
|
||||
libpam-modules1.1.8-3.6ubuntu2.18.04.1
|
||||
libpam-modules-bin1.1.8-3.6ubuntu2.18.04.1
|
||||
libpam-runtime1.1.8-3.6ubuntu2.18.04.1
|
||||
libpcre32:8.39-9
|
||||
libperl5.265.26.1-6ubuntu0.3
|
||||
libprocps62:3.3.12-3ubuntu1.2
|
||||
libpsl50.19.1-5build1
|
||||
libroken18-heimdal7.5.0+dfsg-1
|
||||
librtmp12.4+20151223.gitfa8646d.1-1
|
||||
libsasl2-22.1.27~101-g0780600+dfsg-3ubuntu2
|
||||
libsasl2-modules2.1.27~101-g0780600+dfsg-3ubuntu2
|
||||
libsasl2-modules-db2.1.27~101-g0780600+dfsg-3ubuntu2
|
||||
libseccomp22.4.1-0ubuntu0.18.04.2
|
||||
libselinux12.7-2build2
|
||||
libsemanage12.7-2build2
|
||||
libsemanage-common2.7-2build2
|
||||
libsepol12.7-1
|
||||
libsmartcols12.31.1-0.4ubuntu3.4
|
||||
libsqlite3-03.22.0-1ubuntu0.2
|
||||
libss21.44.1-1ubuntu1.2
|
||||
libssl1.0.01.0.2n-1ubuntu5.3
|
||||
libssl1.11.1.1-1ubuntu2.1~18.04.5
|
||||
libstdc++68.3.0-6ubuntu1~18.04.1
|
||||
libsystemd0237-3ubuntu10.33
|
||||
libtasn1-64.13-2
|
||||
libtinfo56.1-1ubuntu1.18.04
|
||||
libudev1237-3ubuntu10.33
|
||||
libunistring20.9.9-0ubuntu2
|
||||
libuuid12.31.1-0.4ubuntu3.4
|
||||
libwind0-heimdal7.5.0+dfsg-1
|
||||
libx11-62:1.6.4-3ubuntu0.2
|
||||
libx11-data2:1.6.4-3ubuntu0.2
|
||||
libxau61:1.0.8-1
|
||||
libxcb11.13-2~ubuntu18.04
|
||||
libxdmcp61:1.1.2-3
|
||||
libxext62:1.3.3-1
|
||||
libxmuu12:1.1.2-2
|
||||
libzstd11.3.3+dfsg-2ubuntu1.1
|
||||
locales2.27-3ubuntu1
|
||||
login1:4.5-1ubuntu2
|
||||
lsb-base9.20170808ubuntu1
|
||||
mawk1.3.3-17ubuntu3
|
||||
mount2.31.1-0.4ubuntu3.4
|
||||
multiarch-support2.27-3ubuntu1
|
||||
nano2.9.3-2
|
||||
ncurses-base6.1-1ubuntu1.18.04
|
||||
ncurses-bin6.1-1ubuntu1.18.04
|
||||
netbase5.4
|
||||
net-tools1.60+git20161116.90da8a0-1ubuntu1
|
||||
openssh-client1:7.6p1-4ubuntu0.3
|
||||
openssl1.1.1-1ubuntu2.1~18.04.5
|
||||
passwd1:4.5-1ubuntu2
|
||||
patch2.7.6-2ubuntu1.1
|
||||
perl5.26.1-6ubuntu0.3
|
||||
perl-base5.26.1-6ubuntu0.3
|
||||
perl-modules-5.265.26.1-6ubuntu0.3
|
||||
procps2:3.3.12-3ubuntu1.2
|
||||
publicsuffix20180223.1310-1
|
||||
sed4.4-2
|
||||
sensible-utils0.0.12
|
||||
sudo1.8.21p2-3ubuntu1.1
|
||||
sysvinit-utils2.88dsf-59.10ubuntu1
|
||||
tar1.29b-2ubuntu0.1
|
||||
tzdata2019c-0ubuntu0.18.04
|
||||
ubuntu-keyring2018.09.18.1~18.04.0
|
||||
util-linux2.31.1-0.4ubuntu3.4
|
||||
xauth1:1.0.10-1
|
||||
zlib1g1:1.2.11.dfsg-0ubuntu2
|
@ -65,6 +65,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "28.01.20:", desc: "Release python2-mod." }
|
||||
- { date: "17.01.20:", desc: "Fix artifact url retrieval from github." }
|
||||
- { date: "24.10.19:", desc: "Upgrade to v2 builds." }
|
||||
- { date: "28.09.19:", desc: "Update project logo." }
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
mkdir -p /config/{extensions,data,workspace,.ssh}
|
||||
|
||||
if [ -n "${SUDO_PASSWORD}" ]; then
|
||||
echo "setting up sudo access"
|
||||
if ! grep -q 'abc' /etc/sudoers; then
|
||||
echo "adding abc to sudoers"
|
||||
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||
fi
|
||||
echo "setting sudo password"
|
||||
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
||||
fi
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config
|
5
root/etc/cont-init.d/99-python2
Normal file
5
root/etc/cont-init.d/99-python2
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
apt update && apt install -y \
|
||||
python \
|
||||
python-pip
|
@ -1,19 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ -n "${PASSWORD}" ]; then
|
||||
AUTH="password"
|
||||
else
|
||||
AUTH="none"
|
||||
echo "starting with no password"
|
||||
fi
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc \
|
||||
/usr/bin/code-server \
|
||||
--port 8443 \
|
||||
--user-data-dir /config/data \
|
||||
--extensions-dir /config/extensions \
|
||||
--disable-telemetry \
|
||||
--disable-updates \
|
||||
--auth "${AUTH}" \
|
||||
/config/workspace
|
Loading…
Reference in New Issue
Block a user