Compare commits

..

12 Commits

Author SHA1 Message Date
LinuxServer-CI
86227b0e2d Bot Updating Package Versions 2024-08-19 23:42:51 +00:00
LinuxServer-CI
deb7a4925c Bot Updating Package Versions 2024-08-17 20:23:04 +00:00
LinuxServer-CI
f203d3a7c1 Bot Updating Templated Files 2024-08-17 20:20:10 +00:00
LinuxServer-CI
9b20246cde Bot Updating Templated Files 2024-08-17 20:17:56 +00:00
LinuxServer-CI
9ca15d0f9d Bot Updating Package Versions 2024-08-10 20:19:55 +00:00
LinuxServer-CI
e4b105a61a Bot Updating Package Versions 2024-08-03 20:18:19 +00:00
LinuxServer-CI
218becb211 Bot Updating Package Versions 2024-07-17 17:40:18 +00:00
LinuxServer-CI
92e9eab4d5 Bot Updating Templated Files 2024-07-13 20:18:48 +00:00
LinuxServer-CI
89eb9d7478 Bot Updating Templated Files 2024-07-13 20:17:26 +00:00
LinuxServer-CI
0e9479744a Bot Updating Package Versions 2024-07-10 07:43:03 +00:00
LinuxServer-CI
8ba6ad1f09 Bot Updating Package Versions 2024-07-06 20:19:25 +00:00
LinuxServer-CI
3021ba30a7 Bot Updating Package Versions 2024-06-21 19:40:27 +00:00
7 changed files with 157 additions and 108 deletions

View File

@@ -12,17 +12,20 @@ jobs:
- name: External Trigger
if: github.ref == 'refs/heads/master'
run: |
printf "# External trigger for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER }}" ]; then
echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
echo "Github secret \`PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github secret \`PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
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 master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\`" >> $GITHUB_STEP_SUMMARY
echo "**** Retrieving external version ****"
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of master branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_CODE_SERVER_MASTER\`" >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/coder/code-server/releases/latest | jq -r '.tag_name' | sed 's|^v||')
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve external version for code-server branch master"
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,
@@ -31,9 +34,8 @@ jobs:
exit 1
fi
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "**** External version: ${EXT_RELEASE} ****"
echo "External version: ${EXT_RELEASE}" >> $GITHUB_STEP_SUMMARY
echo "**** Retrieving last pushed version ****"
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
image="linuxserver/code-server"
tag="latest"
token=$(curl -sX GET \
@@ -60,37 +62,34 @@ jobs:
IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}')
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}')
if [ -z "${IMAGE_VERSION}" ]; then
echo "**** Can't retrieve last pushed version, exiting ****"
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="Can't retrieve last pushed version for code-server tag latest"
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"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 1
fi
echo "**** Last pushed version: ${IMAGE_VERSION} ****"
echo "Last pushed version: ${IMAGE_VERSION}" >> $GITHUB_STEP_SUMMARY
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "**** Version ${EXT_RELEASE} already pushed, exiting ****"
echo "Version ${EXT_RELEASE} already pushed, exiting" >> $GITHUB_STEP_SUMMARY
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
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
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" >> $GITHUB_STEP_SUMMARY
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
exit 0
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" >> $GITHUB_STEP_SUMMARY
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=false \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
echo "**** Sleeping 10 seconds until job starts ****"
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "**** Jenkins job build url: ${buildurl} ****"
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
echo "**** Attempting to change the Jenkins job description ****"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \

View File

@@ -15,31 +15,31 @@ jobs:
- name: External Trigger Scheduler
run: |
echo "**** Branches found: ****"
git for-each-ref --format='%(refname:short)' refs/remotes
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
printf "# External trigger scheduler for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
br=$(echo "$br" | sed 's|origin/||g')
echo "**** Evaluating branch ${br} ****"
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml)
ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch')
ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type')
if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then
echo "**** Branch ${br} appears to be live and trigger is not os; checking workflow. ****"
echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then
echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****."
echo "Triggering external trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY
curl -iX POST \
-H "Authorization: token ${{ secrets.CR_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"ref\":\"refs/heads/${br}\"}" \
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/external_trigger.yml/dispatches
else
echo "**** Workflow doesn't exist; skipping trigger. ****"
echo "Skipping branch ${br} due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY
fi
else
echo "**** ${br} is either a dev branch, or has no external version; skipping trigger. ****"
echo "Skipping branch ${br} due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY
fi
done

View File

@@ -12,29 +12,29 @@ jobs:
- name: Package Trigger
if: github.ref == 'refs/heads/master'
run: |
printf "# Package trigger for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER }}" ]; then
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER is set; skipping trigger. ****"
echo "Github secret \`PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github secret \`PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\` is set; skipping trigger." >> $GITHUB_STEP_SUMMARY
exit 0
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
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" >> $GITHUB_STEP_SUMMARY
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> There already seems to be an active build on Jenkins; skipping package trigger" >> $GITHUB_STEP_SUMMARY
exit 0
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 master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\`" >> $GITHUB_STEP_SUMMARY
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> Package trigger running off of master branch. To disable, set a Github secret named \`PAUSE_PACKAGE_TRIGGER_CODE_SERVER_MASTER\`" >> $GITHUB_STEP_SUMMARY
response=$(curl -iX POST \
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-code-server/job/master/buildWithParameters?PACKAGE_CHECK=true \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
echo "**** Sleeping 10 seconds until job starts ****"
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
sleep 10
buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url')
buildurl="${buildurl%$'\r'}"
echo "**** Jenkins job build url: ${buildurl} ****"
echo "Jenkins job build url: ${buildurl}" >> $GITHUB_STEP_SUMMARY
echo "**** Attempting to change the Jenkins job description ****"
echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY
echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY
curl -iX POST \
"${buildurl}submitDescription" \
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \

View File

@@ -15,17 +15,19 @@ jobs:
- name: Package Trigger Scheduler
run: |
echo "**** Branches found: ****"
git for-each-ref --format='%(refname:short)' refs/remotes
for br in $(git for-each-ref --format='%(refname:short)' refs/remotes)
printf "# Package trigger scheduler for docker-code-server\n\n" >> $GITHUB_STEP_SUMMARY
printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY
for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes)
do
br=$(echo "$br" | sed 's|origin/||g')
echo "**** Evaluating branch ${br} ****"
if [[ "${br}" == "HEAD" ]]; then
printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY
continue
fi
printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY
ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/jenkins-vars.yml | yq -r '.ls_branch')
if [ "${br}" == "${ls_branch}" ]; then
echo "**** Branch ${br} appears to be live; checking workflow. ****"
echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY
if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-code-server/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then
echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****"
echo "Triggering package trigger workflow for branch ${br}" >> $GITHUB_STEP_SUMMARY
triggered_branches="${triggered_branches}${br} "
curl -iX POST \
@@ -35,11 +37,9 @@ jobs:
https://api.github.com/repos/linuxserver/docker-code-server/actions/workflows/package_trigger.yml/dispatches
sleep 30
else
echo "**** Workflow doesn't exist; skipping trigger. ****"
echo "Skipping branch ${br} due to no package trigger workflow present." >> $GITHUB_STEP_SUMMARY
fi
else
echo "**** ${br} appears to be a dev branch; skipping trigger. ****"
echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY
fi
done

View File

@@ -5,6 +5,8 @@ on:
- '**/run'
- '**/finish'
- '**/check'
- 'root/migrations/*'
jobs:
permission_check:
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

74
Jenkinsfile vendored
View File

@@ -17,6 +17,8 @@ pipeline {
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
CONTAINER_NAME = 'code-server'
BUILD_VERSION_ARG = 'CODE_RELEASE'
LS_USER = 'linuxserver'
@@ -36,9 +38,23 @@ pipeline {
CI_WEBPATH=''
}
stages {
stage("Set git config"){
steps{
sh '''#!/bin/bash
cat ${GIT_SIGNING_KEY} > /config/.ssh/id_sign
chmod 600 /config/.ssh/id_sign
ssh-keygen -y -f /config/.ssh/id_sign > /config/.ssh/id_sign.pub
echo "Using $(ssh-keygen -lf /config/.ssh/id_sign) to sign commits"
git config --global gpg.format ssh
git config --global user.signingkey /config/.ssh/id_sign
git config --global commit.gpgsign true
'''
}
}
// Setup all the basic environment variables needed for the build
stage("Set ENV Variables base"){
steps{
echo "Running on node: ${NODE_NAME}"
sh '''#! /bin/bash
containers=$(docker ps -aq)
if [[ -n "${containers}" ]]; then
@@ -245,7 +261,7 @@ pipeline {
-v ${WORKSPACE}:/mnt \
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
ghcr.io/linuxserver/baseimage-alpine:3.19 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
ghcr.io/linuxserver/baseimage-alpine:3.20 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
apk add --no-cache python3 && \
python3 -m venv /lsiopy && \
pip install --no-cache-dir -U pip && \
@@ -352,7 +368,7 @@ pipeline {
fi
echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub"
mkdir -p ${TEMPDIR}/docs
git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
git clone --depth=1 https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/
cd ${TEMPDIR}/docs/docker-documentation
@@ -370,8 +386,8 @@ pipeline {
echo "Docs update not needed, skipping"
fi
mkdir -p ${TEMPDIR}/unraid
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
git clone --depth=1 https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
git clone --depth=1 https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates
if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
@@ -381,9 +397,9 @@ pipeline {
echo "Updating Unraid template"
cd ${TEMPDIR}/unraid/templates/
GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then
if grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then
echo "Image is on the ignore list, and already in the deprecation folder."
elif grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
elif grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
echo "Image is on the ignore list, marking Unraid template as deprecated"
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/
git add -u unraid/${CONTAINER_NAME}.xml
@@ -476,10 +492,10 @@ pipeline {
}
}
/* #######################
GitLab Mirroring
GitLab Mirroring and Quay.io Repo Visibility
####################### */
// Ping into Gitlab to mirror this repo and have a registry endpoint
stage("GitLab Mirror"){
// Ping into Gitlab to mirror this repo and have a registry endpoint & mark this repo on Quay.io as public
stage("GitLab Mirror and Quay.io Visibility"){
when {
environment name: 'EXIT_STATUS', value: ''
}
@@ -495,6 +511,8 @@ pipeline {
"visibility":"public"}' '''
sh '''curl -H "Private-Token: ${GITLAB_TOKEN}" -X PUT "https://gitlab.com/api/v4/projects/Linuxserver.io%2F${LS_REPO}" \
-d "mirror=true&import_url=https://github.com/linuxserver/${LS_REPO}.git" '''
sh '''curl -H "Content-Type: application/json" -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" -X POST "https://quay.io/api/v1/repository${QUAYIMAGE/quay.io/}/changevisibility" \
-d '{"visibility":"public"}' ||: '''
}
}
/* ###############
@@ -589,7 +607,7 @@ pipeline {
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
retry(5) {
retry_backoff(5,5) {
sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
}
sh '''#! /bin/bash
@@ -703,7 +721,7 @@ pipeline {
set -e
docker pull ghcr.io/linuxserver/ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
docker run --rm \
@@ -745,7 +763,7 @@ pipeline {
passwordVariable: 'QUAYPASS'
]
]) {
retry(5) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
@@ -763,7 +781,7 @@ pipeline {
docker push ${PUSHIMAGE}:${META_TAG}
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${PUSHIMAGE}:${SEMVER}
docker push ${PUSHIMAGE}:${SEMVER}
fi
done
'''
@@ -786,7 +804,7 @@ pipeline {
passwordVariable: 'QUAYPASS'
]
]) {
retry(5) {
retry_backoff(5,5) {
sh '''#! /bin/bash
set -e
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
@@ -794,7 +812,7 @@ pipeline {
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
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
@@ -849,7 +867,7 @@ pipeline {
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
@@ -981,6 +999,13 @@ EOF
###################### */
post {
always {
sh '''#!/bin/bash
rm -rf /config/.ssh/id_sign
rm -rf /config/.ssh/id_sign.pub
git config --global --unset gpg.format
git config --global --unset user.signingkey
git config --global --unset commit.gpgsign
'''
script{
if (env.EXIT_STATUS == "ABORTED"){
sh 'echo "build aborted"'
@@ -1010,3 +1035,20 @@ EOF
}
}
}
def retry_backoff(int max_attempts, int power_base, Closure c) {
int n = 0
while (n < max_attempts) {
try {
c()
return
} catch (err) {
if ((n + 1) >= max_attempts) {
throw err
}
sleep(power_base ** n)
n++
}
}
return
}

View File

@@ -13,24 +13,26 @@ NAME VERSION
@tootallnate/quickjs-emscripten 0.23.0 npm
@vscode/deviceid 0.1.1 npm
@vscode/iconv-lite-umd 0.7.0 npm
@vscode/proxy-agent 0.19.1 npm
@vscode/proxy-agent 0.22.0 npm
@vscode/ripgrep 1.15.9 npm
@vscode/spdlog 0.15.0 npm
@vscode/vscode-languagedetection 1.0.21 npm
@vscode/windows-process-tree 0.6.0 npm
@vscode/windows-registry 1.1.0 npm
@xterm/addon-image 0.9.0-beta.17 npm
@xterm/addon-search 0.16.0-beta.17 npm
@xterm/addon-serialize 0.14.0-beta.17 npm
@xterm/addon-unicode11 0.9.0-beta.17 npm
@xterm/addon-webgl 0.19.0-beta.17 npm
@xterm/headless 5.6.0-beta.17 npm
@xterm/xterm 5.6.0-beta.17 npm
@xterm/addon-clipboard 0.2.0-beta.34 npm
@xterm/addon-image 0.9.0-beta.51 npm
@xterm/addon-search 0.16.0-beta.51 npm
@xterm/addon-serialize 0.14.0-beta.51 npm
@xterm/addon-unicode11 0.9.0-beta.51 npm
@xterm/addon-webgl 0.19.0-beta.51 npm
@xterm/headless 5.6.0-beta.51 npm
@xterm/xterm 5.6.0-beta.51 npm
abbrev 1.1.1 npm
accepts 1.3.8 npm
adduser 3.118ubuntu5 deb
agent-base 6.0.2 npm
agent-base 7.1.0 npm (+1 duplicate)
agent-base 7.1.1 npm
ansi-regex 5.0.1 npm
aproba 2.0.0 npm
apt 2.4.12 deb
@@ -52,7 +54,7 @@ bindings 1.5.0
bl 4.1.0 npm
body-parser 2.0.0-beta.2 npm
brace-expansion 1.1.11 npm
braces 3.0.2 npm
braces 3.0.3 npm
bsdutils 1:2.37.2-4ubuntu3.4 deb
buffer 5.7.1 npm
buffer-alloc 1.2.0 npm
@@ -70,7 +72,7 @@ charenc 0.0.2
chownr 1.1.4 npm
chownr 2.0.0 npm
clojure 1.0.0 npm
code-server 4.90.2 npm
code-server 4.92.2 npm
coffeescript 1.0.0 npm
color-support 1.1.3 npm
compressible 2.0.18 npm
@@ -92,7 +94,7 @@ crypt 0.0.2
csharp 1.0.0 npm
css 1.0.0 npm
css-language-features 1.0.0 npm
curl 7.81.0-1ubuntu1.16 deb
curl 7.81.0-1ubuntu1.17 deb
dart 1.0.0 npm
dash 0.5.11+git20210903+057cd650a4ed-3build1 deb
data-uri-to-buffer 5.0.1 npm
@@ -139,7 +141,7 @@ express 5.0.0-beta.3
extension-editing 1.0.0 npm
fd-slicer 1.1.0 npm
file-uri-to-path 1.0.0 npm
fill-range 7.0.1 npm
fill-range 7.1.1 npm
finalhandler 1.2.0 npm
findutils 4.8.0-1ubuntu3 deb
follow-redirects 1.15.6 npm
@@ -212,7 +214,8 @@ ini 1.0.0
ini 1.3.8 npm
init-system-helpers 1.62 deb
ip 1.1.9 npm
ip 2.0.1 npm (+1 duplicate)
ip 2.0.1 npm
ip-address 9.0.5 npm
ipaddr.js 1.9.1 npm
ipynb 1.0.0 npm
is-buffer 1.1.6 npm
@@ -226,17 +229,19 @@ jake 1.0.0
java 1.0.0 npm
javascript 1.0.0 npm
jq 1.6-2.1ubuntu3 deb
js-debug 1.90.0 npm
js-debug-companion 1.1.2 npm
js-base64 3.7.7 npm
js-debug 1.92.0 npm
js-debug-companion 1.1.3 npm
js-yaml 4.1.0 npm
jschardet 3.0.0 npm
jsbn 1.1.0 npm
jschardet 3.1.3 npm
json 1.0.0 npm
json-language-features 1.0.0 npm
jsonfile 4.0.0 npm
jsonfile 6.1.0 npm
julia 1.0.0 npm
just-performance 4.3.0 npm
kerberos 2.0.1 npm
kerberos 2.1.1-alpha.0 npm
latex 1.0.0 npm
less 1.0.0 npm
less 590-1ubuntu0.22.04.3 deb
@@ -258,8 +263,8 @@ libcap2 1:2.44-1ubuntu0.22.04.1
libcbor0.8 0.8.0-2ubuntu1 deb
libcom-err2 1.46.5-2ubuntu1.1 deb
libcrypt1 1:4.4.27-1 deb
libcurl3-gnutls 7.81.0-1ubuntu1.16 deb
libcurl4 7.81.0-1ubuntu1.16 deb
libcurl3-gnutls 7.81.0-1ubuntu1.17 deb
libcurl4 7.81.0-1ubuntu1.17 deb
libdb5.3 5.3.28+dfsg1-0.8ubuntu3 deb
libdebconfclient0 0.261ubuntu1 deb
libedit2 3.1-20210910-1build1 deb
@@ -275,17 +280,17 @@ libgdbm6 1.23-1
libgmp10 2:6.2.1+dfsg-3ubuntu1 deb
libgnutls30 3.7.3-4ubuntu1.5 deb
libgpg-error0 1.43-3 deb
libgssapi-krb5-2 1.19.2-2ubuntu0.3 deb
libgssapi-krb5-2 1.19.2-2ubuntu0.4 deb
libhogweed6 3.7.3-1build2 deb
libidn2-0 2.3.2-2build1 deb
libjq1 1.6-2.1ubuntu3 deb
libk5crypto3 1.19.2-2ubuntu0.3 deb
libk5crypto3 1.19.2-2ubuntu0.4 deb
libkeyutils1 1.6.1-2ubuntu3 deb
libkrb5-3 1.19.2-2ubuntu0.3 deb
libkrb5support0 1.19.2-2ubuntu0.3 deb
libkrb5-3 1.19.2-2ubuntu0.4 deb
libkrb5support0 1.19.2-2ubuntu0.4 deb
libksba8 1.6.0-2ubuntu0.2 deb
libldap-2.5-0 2.5.17+dfsg-0ubuntu0.22.04.1 deb
libldap-common 2.5.17+dfsg-0ubuntu0.22.04.1 deb
libldap-2.5-0 2.5.18+dfsg-0ubuntu0.22.04.2 deb
libldap-common 2.5.18+dfsg-0ubuntu0.22.04.2 deb
liblz4-1 1.9.3-2build2 deb
liblzma5 5.2.5-2ubuntu1 deb
libmd0 1.0.4-1build1 deb
@@ -321,7 +326,7 @@ libsmartcols1 2.37.2-4ubuntu3.4
libsqlite3-0 3.37.2-2ubuntu0.3 deb
libss2 1.46.5-2ubuntu1.1 deb
libssh-4 0.9.6-2ubuntu0.22.04.3 deb
libssl3 3.0.2-0ubuntu1.15 deb
libssl3 3.0.2-0ubuntu1.17 deb
libstdc++6 12.3.0-1ubuntu1~22.04 deb
libsystemd0 249.11-0ubuntu3.12 deb
libtasn1-6 4.18.0-4build1 deb
@@ -391,7 +396,7 @@ netmask 2.0.2
node 20.11.1 binary
node-abi 3.8.0 npm
node-addon-api 3.2.1 npm
node-addon-api 4.3.0 npm
node-addon-api 6.1.0 npm
node-addon-api 7.0.0 npm
node-addon-api 7.1.0 npm
node-fetch 2.7.0 npm
@@ -408,8 +413,8 @@ objective-c 1.0.0
on-finished 2.4.1 npm
on-headers 1.0.2 npm
once 1.4.0 npm (+1 duplicate)
openssh-client 1:8.9p1-3ubuntu0.7 deb
openssl 3.0.2-0ubuntu1.15 deb
openssh-client 1:8.9p1-3ubuntu0.10 deb
openssl 3.0.2-0ubuntu1.17 deb
os-tmpdir 1.0.2 npm
pac-proxy-agent 7.0.1 npm
pac-resolver 7.0.0 npm
@@ -429,7 +434,7 @@ php-language-features 1.0.0
picomatch 2.3.1 npm
pinentry-curses 1.1.1-1build2 deb
powershell 1.0.0 npm
prebuild-install 7.1.1 npm
prebuild-install 7.1.2 npm
procps 2:3.3.17-6ubuntu2.1 deb
proxy-addr 2.0.7 npm
proxy-agent 6.4.0 npm
@@ -482,10 +487,12 @@ simple-browser 1.0.0
simple-concat 1.0.1 npm
simple-get 4.0.1 npm
smart-buffer 4.2.0 npm (+1 duplicate)
socks 2.7.1 npm (+1 duplicate)
socks-proxy-agent 8.0.1 npm
socks 2.7.1 npm
socks 2.8.3 npm
socks-proxy-agent 8.0.2 npm
socks-proxy-agent 8.0.4 npm
source-map 0.6.1 npm
sprintf-js 1.1.3 npm
sql 1.0.0 npm
statuses 2.0.1 npm
string-width 4.2.3 npm
@@ -518,9 +525,9 @@ tunnel-agent 0.6.0
tunnel-forwarding 1.0.0 npm
type-is 1.6.18 npm
typescript 1.0.0 npm
typescript 5.4.5 npm
typescript 5.5.4 npm
typescript-language-features 1.0.0 npm
tzdata 2024a-0ubuntu0.22.04 deb
tzdata 2024a-0ubuntu0.22.04.1 deb
ubuntu-keyring 2021.03.26 deb
universalify 0.1.2 npm
universalify 2.0.1 npm
@@ -537,10 +544,9 @@ vscode-extensions 0.0.1
vscode-html-languageserver 1.0.0 npm
vscode-js-profile-table 1.0.9 npm
vscode-json-languageserver 1.3.4 npm
vscode-markdown-languageserver 0.5.0-alpha.6 npm
vscode-oniguruma 1.7.0 npm
vscode-regexpp 3.1.0 npm
vscode-reh 1.90.1 npm
vscode-reh 1.92.2 npm
vscode-textmate 9.0.0 npm
vscode-theme-seti 1.0.0 npm
webidl-conversions 3.0.1 npm
@@ -548,7 +554,7 @@ whatwg-url 5.0.0
which 2.0.2 npm
wide-align 1.1.5 npm
wrappy 1.0.2 npm (+1 duplicate)
ws 8.17.0 npm
ws 8.17.1 npm
xauth 1:1.1-1build2 deb
xdg-basedir 4.0.0 npm
xml 1.0.0 npm