Compare commits

...

11 Commits

Author SHA1 Message Date
LinuxServer-CI
8655d63538 Bot Updating Package Versions 2019-10-10 10:35:02 -04:00
aptalca
2fd1e8b457 fix formatting 2019-10-10 07:33:13 -07:00
aptalca
1a822f0c81 disable updates 2019-10-10 07:33:13 -07:00
LinuxServer-CI
99ba918570 Bot Updating Package Versions 2019-10-07 21:09:02 +01:00
LinuxServer-CI
f06dca6272 Bot Updating Templated Files 2019-10-07 21:07:34 +01:00
LinuxServer-CI
a629cfb790 Bot Updating Templated Files 2019-10-07 16:06:43 -04:00
chbmb
732b1ca922
Merge pull request #10 from linuxserver/telemetry
disable telemetry
2019-09-23 20:13:26 +01:00
aptalca
c1faf7ecbe disable telemetry 2019-09-23 15:06:37 -04:00
aptalca
35b8e16e5f fix arguments for v2 2019-09-22 21:47:48 -07:00
LinuxServer-CI
ed4efdca09 Bot Updating Package Versions 2019-09-18 22:32:53 +01:00
aptalca
6bf1eb5d73 create development builds 2019-09-18 14:31:19 -07:00
9 changed files with 154 additions and 128 deletions

View File

@ -1,21 +1,34 @@
<!--- Provide a general summary of the issue in the Title above -->
[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support.
<!--- If you have an issue with the project, please provide us with the following information -->
<!--- Provide a general summary of the issue in the Title above -->
<!--- Host OS -->
<!--- Command line users, your run/create command, GUI/Unraid users, a screenshot of your template settings. -->
<!--- Docker log output, docker log <container-name> -->
<!--- Mention if you're using symlinks on any of the volume mounts. -->
------------------------------
## Expected Behavior
<!--- Tell us what should happen -->
<!--- If you have a suggestion or fix for the project, please provide us with the following information -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
<!--- What you think your suggestion brings to the project, or fixes with the project -->
<!--- If it's a fix, would it be better suited as a Pull request to the repo ? -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
## Thanks, team linuxserver.io
## Environment
**OS:**
**CPU architecture:** x86_64/arm32/arm64
**How docker service was installed:**
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Command used to create docker container (run/create/compose/screenshot)
<!--- Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container -->
## Docker logs
<!--- Provide a full docker log, output of "docker logs code-server" -->

View File

@ -6,10 +6,34 @@
<!--- Before submitting a pull request please check the following -->
<!--- That you have made a branch in your fork, we'd rather not merge from your master -->
<!--- If this is a fix for a typo in code or documentation in the README please file an issue and let us sort it out we do not need a PR -->
<!--- Ask yourself if this modification is something the whole userbase will benefit from, if this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
<!--- -->
<!--- We maintain a changelog of major revisions to the container at the end of readme-vars.yml in the root of this repository, please add your changes there if appropriate -->
## Thanks, team linuxserver.io
<!--- Coding guidelines: -->
<!--- 1. Installed packages in the Dockerfiles should be in alphabetical order -->
<!--- 2. Changes to Dockerfile should be replicated in Dockerfile.armhf and Dockerfile.aarch64 if applicable -->
<!--- 3. Indentation style (tabs vs 4 spaces vs 1 space) should match the rest of the document -->
<!--- 4. Readme is auto generated from readme-vars.yml, make your changes there -->
------------------------------
We welcome all PRs though this doesnt guarantee it will be accepted.
## Description:
<!--- Describe your changes in detail -->
## Benefits of this PR and context:
<!--- Please explain why we should accept this PR. If this fixes an outstanding bug, please reference the issue # -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Source / References:
<!--- Please include any forum posts/github links relevant to the PR -->

View File

@ -14,20 +14,21 @@ 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='[""]'); \
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases" \
| jq -r 'first(.[] | select(.prerelease == true)) | .tag_name'); \
fi && \
curl -o \
/tmp/code.tar.gz -L \
"https://github.com/cdr/code-server/releases/download/${CODE_RELEASE}/code-server${CODE_RELEASE}-linux-x64.tar.gz" && \
"https://github.com/cdr/code-server/releases/download/${CODE_RELEASE}/code-server${CODE_RELEASE}-linux-x86_64.tar.gz" && \
tar xzf /tmp/code.tar.gz -C \
/usr/bin/ --strip-components=1 \
--wildcards code-server*/code-server && \
--wildcards code-server*/code-server && \
echo "**** clean up ****" && \
rm -rf \
/tmp/* \

140
Jenkinsfile vendored
View File

@ -2,6 +2,10 @@ pipeline {
agent {
label 'X86-64-MULTI'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', daysToKeepStr: '60'))
parallelsAlwaysFailFast()
}
// Input to determine if this is a package check
parameters {
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
@ -10,9 +14,8 @@ pipeline {
environment {
BUILDS_DISCORD=credentials('build_webhook_url')
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
EXT_GIT_BRANCH = 'master'
EXT_USER = 'cdr'
EXT_REPO = 'code-server'
JSON_URL = 'https://api.github.com/repos/cdr/code-server/releases'
JSON_PATH = 'first(.[] | select(.prerelease == true)) | .tag_name'
CONTAINER_NAME = 'code-server'
BUILD_VERSION_ARG = 'CODE_RELEASE'
LS_USER = 'linuxserver'
@ -38,7 +41,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}':development 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' ''',
@ -52,22 +55,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.LICENSE_TAG = sh(
script: '''#!/bin/bash
if [ -e LICENSE ] ; then
cat LICENSE | md5sum | cut -c1-8
else
echo none
fi''',
returnStdout: true).trim()
env.FUNDING_TAG = sh(
script: '''#!/bin/bash
if [ -e ./.github/FUNDING.yml ] ; then
cat ./.github/FUNDING.yml | md5sum | cut -c1-8
else
echo none
fi''',
returnStdout: true).trim()
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md'
}
script{
env.LS_RELEASE_NUMBER = sh(
@ -110,21 +98,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"){
// If this is a custom json endpoint parse the return to get external tag
stage("Set ENV custom_json"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
script: '''curl -s ${JSON_URL} | jq -r ". | ${JSON_PATH}" ''',
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
env.RELEASE_LINK = env.JSON_URL
}
}
}
@ -138,10 +119,10 @@ pipeline {
}
}
}
// If this is a master build use live docker endpoints
// If this is a development build use live docker endpoints
stage("Set ENV live build"){
when {
branch "master"
branch "development"
environment name: 'CHANGE_ID', value: ''
}
steps {
@ -159,7 +140,7 @@ pipeline {
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "master"}
not {branch "development"}
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 "development"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
@ -237,36 +218,33 @@ 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 pull linuxserver/doc-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
if [ "$(md5sum ${TEMPDIR}/${LS_REPO}/Jenkinsfile | awk '{ print $1 }')" != "$(md5sum Jenkinsfile | awk '{ print $1 }')" ] || \
[ "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/README.md | awk '{ print $1 }')" != "$(md5sum README.md | awk '{ print $1 }')" ] || \
[ "$(cat ${TEMPDIR}/${LS_REPO}/LICENSE | md5sum | cut -c1-8)" != "${LICENSE_TAG}" ] || \
[ "$(cat ${TEMPDIR}/${LS_REPO}/.github/FUNDING.yml | md5sum | cut -c1-8)" != "${FUNDING_TAG}" ]; then
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=development -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)
if [[ "${CURRENTHASH}" != "${NEWHASH}" ]]; then
mkdir -p ${TEMPDIR}/repo
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git checkout -f master
cp ${TEMPDIR}/${CONTAINER_NAME}/README.md ${TEMPDIR}/repo/${LS_REPO}/
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/LICENSE ${TEMPDIR}/repo/${LS_REPO}/
cd ${TEMPDIR}/repo/${LS_REPO}
git checkout -f development
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.github/FUNDING.yml ${TEMPDIR}/repo/${LS_REPO}/.github/FUNDING.yml
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/
cd ${TEMPDIR}/repo/${LS_REPO}/
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git add Jenkinsfile README.md LICENSE ./.github/FUNDING.yml
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git commit -m 'Bot Updating Templated Files'
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
git add ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
mkdir -p ${TEMPDIR}/gitbook
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
if [[ "${BRANCH_NAME}" == "master" ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/
cd ${TEMPDIR}/gitbook/docker-documentation/
git add images/docker-${CONTAINER_NAME}.md
git commit -m 'Bot Updating Templated Files'
git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
fi
rm -Rf ${TEMPDIR}'''
@ -280,7 +258,7 @@ pipeline {
// Exit the build if the Templated files were just updated
stage('Template-exit') {
when {
branch "master"
branch "development"
environment name: 'CHANGE_ID', value: ''
environment name: 'FILES_UPDATED', value: 'true'
expression {
@ -379,7 +357,7 @@ pipeline {
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "master"
branch "development"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
@ -407,7 +385,7 @@ pipeline {
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
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f development
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
wait
@ -431,7 +409,7 @@ pipeline {
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "master"
branch "development"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
@ -445,7 +423,7 @@ pipeline {
// Exit the build if this is just a package check and there are no changes to push
stage('PACKAGECHECK-exit') {
when {
branch "master"
branch "development"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
@ -530,12 +508,12 @@ pipeline {
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:latest"
sh "docker push ${IMAGE}:latest"
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:development"
sh "docker push ${IMAGE}:development"
sh "docker push ${IMAGE}:${META_TAG}"
sh '''docker rmi \
${IMAGE}:${META_TAG} \
${IMAGE}:latest || :'''
${IMAGE}:development || :'''
}
}
@ -565,32 +543,32 @@ pipeline {
docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi'''
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-latest"
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-latest"
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-latest"
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-development"
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-development"
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-development"
sh "docker push ${IMAGE}:amd64-${META_TAG}"
sh "docker push ${IMAGE}:arm32v7-${META_TAG}"
sh "docker push ${IMAGE}:arm64v8-${META_TAG}"
sh "docker push ${IMAGE}:amd64-latest"
sh "docker push ${IMAGE}:arm32v7-latest"
sh "docker push ${IMAGE}:arm64v8-latest"
sh "docker manifest push --purge ${IMAGE}:latest || :"
sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v7-latest ${IMAGE}:arm64v8-latest"
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v7-latest --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8"
sh "docker push ${IMAGE}:amd64-development"
sh "docker push ${IMAGE}:arm32v7-development"
sh "docker push ${IMAGE}:arm64v8-development"
sh "docker manifest push --purge ${IMAGE}:development || :"
sh "docker manifest create ${IMAGE}:development ${IMAGE}:amd64-development ${IMAGE}:arm32v7-development ${IMAGE}:arm64v8-development"
sh "docker manifest annotate ${IMAGE}:development ${IMAGE}:arm32v7-development --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:development ${IMAGE}:arm64v8-development --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:${META_TAG} || :"
sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v7-${META_TAG} --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:latest"
sh "docker manifest push --purge ${IMAGE}:development"
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
sh '''docker rmi \
${IMAGE}:amd64-${META_TAG} \
${IMAGE}:amd64-latest \
${IMAGE}:amd64-development \
${IMAGE}:arm32v7-${META_TAG} \
${IMAGE}:arm32v7-latest \
${IMAGE}:arm32v7-development \
${IMAGE}:arm64v8-${META_TAG} \
${IMAGE}:arm64v8-latest \
${IMAGE}:arm64v8-development \
lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \
lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :'''
}
@ -599,7 +577,7 @@ pipeline {
// If this is a public release tag it in the LS Github
stage('Github-Tag-Push-Release') {
when {
branch "master"
branch "development"
expression {
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
}
@ -611,17 +589,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 development",\
"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 "Data change at JSON endpoint ${JSON_URL}" > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "master",\
"target_commitish": "development",\
"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**Remote 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'''
}

View File

@ -54,6 +54,14 @@ The architectures supported by this image are:
| :----: | --- |
| x86-64 | amd64-latest |
## Version Tags
This image provides various versions that are available via tags. `latest` tag usually provides the latest stable version. Others are considered under development and caution must be exercised when using them.
| Tag | Description |
| :----: | --- |
| latest | Stable releases |
| development | Prereleases from their GitHub |
## Usage

View File

@ -2,14 +2,13 @@
# jenkins variables
project_name: docker-code-server
external_type: github_stable
release_type: stable
release_tag: latest
ls_branch: master
external_type: custom_json
release_type: prerelease
release_tag: development
ls_branch: development
repo_vars:
- EXT_GIT_BRANCH = 'master'
- EXT_USER = 'cdr'
- EXT_REPO = 'code-server'
- JSON_URL = 'https://api.github.com/repos/cdr/code-server/releases'
- JSON_PATH = 'first(.[] | select(.prerelease == true)) | .tag_name'
- CONTAINER_NAME = 'code-server'
- BUILD_VERSION_ARG = 'CODE_RELEASE'
- LS_USER = 'linuxserver'

View File

@ -1,6 +1,6 @@
adduser3.116ubuntu1
apt1.6.11
apt-utils1.6.11
apt1.6.12
apt-utils1.6.12
base-files10.1ubuntu2.6
base-passwd3.5.44
bash4.4.18-2ubuntu1.2
@ -13,23 +13,24 @@ dash0.5.8-2.10
debconf1.5.66ubuntu1
debianutils4.8.4
diffutils1:3.6-1
dpkg1.19.0.5ubuntu2.2
e2fsprogs1.44.1-1ubuntu1.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.4
git-man1:2.17.1-1ubuntu0.4
gpgv2.2.4-1ubuntu1.2
grep3.1-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.11
libapt-pkg5.01.6.11
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
@ -40,7 +41,7 @@ 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.1
libcom-err21.44.1-1ubuntu1.2
libcurl3-gnutls7.58.0-2ubuntu3.8
libcurl47.58.0-2ubuntu3.8
libdb5.35.3.28-13.1ubuntu1.1
@ -48,7 +49,7 @@ libdebconfclient00.213ubuntu1
libedit23.1-20170329-1
liberror-perl0.17025-1
libexpat12.2.5-3ubuntu0.2
libext2fs21.44.1-1ubuntu1.1
libext2fs21.44.1-1ubuntu1.2
libfdisk12.31.1-0.4ubuntu3.4
libffi63.2.1-8
libgcc11:8.3.0-6ubuntu1~18.04.1
@ -66,6 +67,7 @@ libheimntlm0-heimdal7.5.0+dfsg-1
libhogweed43.4-1
libhx509-5-heimdal7.5.0+dfsg-1
libidn2-02.0.4-1.1build2
libjq11.5+dfsg-2
libk5crypto31.16-2ubuntu0.1
libkeyutils11.5.9-9.2ubuntu2
libkrb5-26-heimdal7.5.0+dfsg-1
@ -80,6 +82,7 @@ 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
@ -101,14 +104,14 @@ libsemanage-common2.7-2build2
libsepol12.7-1
libsmartcols12.31.1-0.4ubuntu3.4
libsqlite3-03.22.0-1ubuntu0.1
libss21.44.1-1ubuntu1.1
libss21.44.1-1ubuntu1.2
libssl1.0.01.0.2n-1ubuntu5.3
libssl1.11.1.1-1ubuntu2.1~18.04.4
libstdc++68.3.0-6ubuntu1~18.04.1
libsystemd0237-3ubuntu10.28
libsystemd0237-3ubuntu10.29
libtasn1-64.13-2
libtinfo56.1-1ubuntu1.18.04
libudev1237-3ubuntu10.28
libudev1237-3ubuntu10.29
libunistring20.9.9-0ubuntu2
libuuid12.31.1-0.4ubuntu3.4
libwind0-heimdal7.5.0+dfsg-1
@ -145,7 +148,7 @@ sensible-utils0.0.12
sudo1.8.21p2-3ubuntu1
sysvinit-utils2.88dsf-59.10ubuntu1
tar1.29b-2ubuntu0.1
tzdata2019b-0ubuntu0.18.04
tzdata2019c-0ubuntu0.18.04
ubuntu-keyring2018.09.18.1~18.04.0
util-linux2.31.1-0.4ubuntu3.4
xauth1:1.0.10-1

View File

@ -24,10 +24,10 @@ available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
# development version
development_versions: false
development_versions: true
development_versions_items:
- { tag: "latest", desc: "Stable releases" }
- { tag: "development", desc: "Releases from the `develop` branch" }
- { tag: "development", desc: "Prereleases from their GitHub" }
# container parameters
common_param_env_vars_enabled: true

View File

@ -1,18 +1,18 @@
#!/usr/bin/with-contenv bash
if [ -n "${PASSWORD}" ]; then
PASSARG="-P ${PASSWORD}"
AUTH="--auth password"
else
PASSARG="-N"
echo "starting with no password"
fi
exec \
s6-setuidgid abc \
/usr/bin/code-server \
-H \
${PASSARG} \
-d /config/data \
-e /config/extensions \
--port 8443 \
--user-data-dir /config/data \
--extensions-dir /config/extensions \
--disable-telemetry \
--disable-updates \
${AUTH} \
/config/workspace