deprecate

This commit is contained in:
aptalca 2022-01-19 15:21:37 -05:00
parent 296f074505
commit 8db42367e1
4 changed files with 74 additions and 44 deletions

88
Jenkinsfile vendored
View File

@ -118,12 +118,11 @@ pipeline {
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+)/
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)$/
if (semver.find()) { if (semver.find()) {
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}" env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
} else { } else {
semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)$/ semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/
if (semver.find()) { if (semver.find()) {
if (semver[0][3]) { if (semver[0][3]) {
env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}" env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}"
@ -133,7 +132,15 @@ pipeline {
} }
} }
println("SEMVER: ${env.SEMVER}") if (env.SEMVER != null) {
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
}
println("SEMVER: ${env.SEMVER}")
} else {
println("No SEMVER detected")
}
} }
} }
} }
@ -402,10 +409,10 @@ pipeline {
steps{ steps{
sh '''#! /bin/bash sh '''#! /bin/bash
set -e 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') PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/code-server") | .uuid')
if [ -z "${PACKAGE_UUID}" ]; then if [ -z "${PACKAGE_UUID}" ]; then
echo "Adding package to Scarf.sh" echo "Adding package to Scarf.sh"
PACKAGE_UUID=$(curl -sX POST https://scarf.sh/api/v1/packages \ curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
-H "Authorization: Bearer ${SCARF_TOKEN}" \ -H "Authorization: Bearer ${SCARF_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"name":"linuxserver/code-server",\ -d '{"name":"linuxserver/code-server",\
@ -413,22 +420,10 @@ pipeline {
"libraryType":"docker",\ "libraryType":"docker",\
"website":"https://github.com/linuxserver/docker-code-server",\ "website":"https://github.com/linuxserver/docker-code-server",\
"backendUrl":"https://ghcr.io/linuxserver/code-server",\ "backendUrl":"https://ghcr.io/linuxserver/code-server",\
"publicUrl":"https://lscr.io/linuxserver/code-server"}' \ "publicUrl":"https://lscr.io/linuxserver/code-server"}' || :
| jq -r .uuid)
else else
echo "Package already exists on Scarf.sh" echo "Package already exists on Scarf.sh"
fi 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"}]'
''' '''
} }
} }
@ -752,11 +747,15 @@ pipeline {
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG} docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:focal docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:focal
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} if [ -n "${SEMVER}" ]; then
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
fi
docker push ${PUSHIMAGE}:focal docker push ${PUSHIMAGE}:focal
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} if [ -n "${SEMVER}" ]; then
docker push ${PUSHIMAGE}:${SEMVER}
fi
done done
''' '''
} }
@ -765,8 +764,10 @@ pipeline {
docker rmi \ docker rmi \
${DELETEIMAGE}:${META_TAG} \ ${DELETEIMAGE}:${META_TAG} \
${DELETEIMAGE}:${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:${EXT_RELEASE_TAG} \
${DELETEIMAGE}:focal \ ${DELETEIMAGE}:focal || :
${DELETEIMAGE}:${SEMVER} || : if [ -n "${SEMVER}" ]; then
docker rmi ${DELETEIMAGE}:${SEMVER} || :
fi
done done
''' '''
} }
@ -816,9 +817,11 @@ 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} if [ -n "${SEMVER}" ]; then
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER} docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER} docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
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}
@ -828,9 +831,11 @@ 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} if [ -n "${SEMVER}" ]; then
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER} docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER} docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
docker manifest push --purge ${MANIFESTIMAGE}:focal || : docker manifest push --purge ${MANIFESTIMAGE}:focal || :
docker manifest create ${MANIFESTIMAGE}:focal ${MANIFESTIMAGE}:amd64-focal ${MANIFESTIMAGE}:arm32v7-focal ${MANIFESTIMAGE}:arm64v8-focal docker manifest create ${MANIFESTIMAGE}:focal ${MANIFESTIMAGE}:amd64-focal ${MANIFESTIMAGE}:arm32v7-focal ${MANIFESTIMAGE}:arm64v8-focal
docker manifest annotate ${MANIFESTIMAGE}:focal ${MANIFESTIMAGE}:arm32v7-focal --os linux --arch arm docker manifest annotate ${MANIFESTIMAGE}:focal ${MANIFESTIMAGE}:arm32v7-focal --os linux --arch arm
@ -843,14 +848,18 @@ 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} || : if [ -n "${SEMVER}" ]; then
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8 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
fi
docker manifest push --purge ${MANIFESTIMAGE}:focal docker manifest push --purge ${MANIFESTIMAGE}:focal
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} if [ -n "${SEMVER}" ]; then
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
fi
done done
''' '''
} }
@ -860,15 +869,18 @@ pipeline {
${DELETEIMAGE}:amd64-${META_TAG} \ ${DELETEIMAGE}:amd64-${META_TAG} \
${DELETEIMAGE}:amd64-focal \ ${DELETEIMAGE}:amd64-focal \
${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \
${DELETEIMAGE}:amd64-${SEMVER} \
${DELETEIMAGE}:arm32v7-${META_TAG} \ ${DELETEIMAGE}:arm32v7-${META_TAG} \
${DELETEIMAGE}:arm32v7-focal \ ${DELETEIMAGE}:arm32v7-focal \
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
${DELETEIMAGE}:arm32v7-${SEMVER} \
${DELETEIMAGE}:arm64v8-${META_TAG} \ ${DELETEIMAGE}:arm64v8-${META_TAG} \
${DELETEIMAGE}:arm64v8-focal \ ${DELETEIMAGE}:arm64v8-focal \
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} \ ${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
${DELETEIMAGE}:arm64v8-${SEMVER} || : if [ -n "${SEMVER}" ]; then
docker rmi \
${DELETEIMAGE}:amd64-${SEMVER} \
${DELETEIMAGE}:arm32v7-${SEMVER} \
${DELETEIMAGE}:arm64v8-${SEMVER} || :
fi
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} \

View File

@ -29,6 +29,7 @@ Find us at:
# [linuxserver/code-server](https://github.com/linuxserver/docker-code-server) # [linuxserver/code-server](https://github.com/linuxserver/docker-code-server)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fcode-server?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Fcode-server)
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-code-server) [![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-code-server.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-code-server)
[![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)
@ -70,7 +71,7 @@ This image provides various versions that are available via tags. `latest` tag u
| Tag | Description | | Tag | Description |
| :----: | --- | | :----: | --- |
| latest | Stable releases | | latest | Stable releases |
| focal | Stable releases, on a focal baseiamge | | focal | DEPRECATED - Stable releases, on a focal baseiamge |
## Application Setup ## Application Setup
@ -261,6 +262,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **19.01.21:** - Deprecate the focal tag.
* **12.07.21:** - Rebase to focal * **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

View File

@ -19,10 +19,6 @@ project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is VS Code ru
- You're no longer running excess instances of Chrome." - You're no longer running excess instances of Chrome."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
project_deprecation_status: true
project_deprecation_message: |
latest tag is now based on Ubuntu Focal
# supported architectures # supported architectures
available_architectures: available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} - { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
@ -33,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: "focal", desc: "Stable releases, on a focal baseiamge" } - { tag: "focal", desc: "DEPRECATED - Stable releases, on a focal baseiamge" }
# container parameters # container parameters
common_param_env_vars_enabled: true common_param_env_vars_enabled: true

View File

@ -0,0 +1,20 @@
#!/usr/bin/with-contenv bash
echo '
******************************************************
******************************************************
* *
* *
* This image tag is deprecated. *
* We will not offer support for this tag *
* and it will not be updated. *
* *
* *
******************************************************
******************************************************
latest tag is now based on Ubuntu Focal
******************************************************
******************************************************'