From 6ca5da020f4bd6533a77bc02d71a02f6fc787b81 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Wed, 20 Jan 2021 17:28:55 -0600 Subject: [PATCH 1/8] Update s6-overlay to v2.2.0.0 for 3.13 --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f3bc5a..fcfcc40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="TheLamer" # set version for s6 overlay -ARG OVERLAY_VERSION="v2.1.0.2" +ARG OVERLAY_VERSION="v2.2.0.0" ARG OVERLAY_ARCH="amd64" # add s6 overlay diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 8f79cf1..bfd5177 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -42,7 +42,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="TheLamer" # set version for s6 overlay -ARG OVERLAY_VERSION="v2.1.0.2" +ARG OVERLAY_VERSION="v2.2.0.0" ARG OVERLAY_ARCH="aarch64" # add s6 overlay diff --git a/Dockerfile.armhf b/Dockerfile.armhf index a2bc3f8..f5044fa 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -42,7 +42,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="TheLamer" # set version for s6 overlay -ARG OVERLAY_VERSION="v2.1.0.2" +ARG OVERLAY_VERSION="v2.2.0.0" ARG OVERLAY_ARCH="arm" # add s6 overlay From 489170a67ac0e3b79b658eb78b31464e9786b1d7 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Wed, 20 Jan 2021 20:30:55 -0600 Subject: [PATCH 2/8] Apply docker mods run logic with patch --- Dockerfile | 3 + Dockerfile.aarch64 | 3 + Dockerfile.armhf | 3 + patch/etc/s6/init/init-stage2.patch | 15 ++ root/etc/s6/init/init-stage2 | 226 ---------------------------- 5 files changed, 24 insertions(+), 226 deletions(-) create mode 100644 patch/etc/s6/init/init-stage2.patch delete mode 100755 root/etc/s6/init/init-stage2 diff --git a/Dockerfile b/Dockerfile index fcfcc40..971edb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,7 @@ ARG OVERLAY_ARCH="amd64" # add s6 overlay ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/ RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer +COPY patch/ /tmp/patch # environment variables ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ @@ -58,6 +59,7 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ curl \ + patch \ tar && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ @@ -76,6 +78,7 @@ RUN \ /config \ /defaults && \ mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ + patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index bfd5177..0a6f598 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -48,6 +48,7 @@ ARG OVERLAY_ARCH="aarch64" # add s6 overlay ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/ RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer +COPY patch/ /tmp/patch # environment variables ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ @@ -58,6 +59,7 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ curl \ + patch \ tar && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ @@ -76,6 +78,7 @@ RUN \ /config \ /defaults && \ mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ + patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-aarch64-static -L \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index f5044fa..94dbdc4 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -48,6 +48,7 @@ ARG OVERLAY_ARCH="arm" # add s6 overlay ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/ RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer +COPY patch/ /tmp/patch # environment variables ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ @@ -58,6 +59,7 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ curl \ + patch \ tar && \ echo "**** install runtime packages ****" && \ apk add --no-cache \ @@ -76,6 +78,7 @@ RUN \ /config \ /defaults && \ mv /usr/bin/with-contenv /usr/bin/with-contenvb && \ + patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-arm-static -L \ diff --git a/patch/etc/s6/init/init-stage2.patch b/patch/etc/s6/init/init-stage2.patch new file mode 100644 index 0000000..db176f8 --- /dev/null +++ b/patch/etc/s6/init/init-stage2.patch @@ -0,0 +1,15 @@ +--- init-stage2 2021-01-20 20:21:41.628300700 -0600 ++++ init-stage2_new 2021-01-20 20:23:48.123677700 -0600 +@@ -17,6 +17,12 @@ + backtick -D 0 -n S6_READ_ONLY_ROOT { printcontenv S6_READ_ONLY_ROOT } + importas -u S6_READ_ONLY_ROOT S6_READ_ONLY_ROOT + ++# Docker Mods run logic ++foreground ++{ ++ /docker-mods ++} ++ + foreground + { + if diff --git a/root/etc/s6/init/init-stage2 b/root/etc/s6/init/init-stage2 deleted file mode 100755 index 7efa57a..0000000 --- a/root/etc/s6/init/init-stage2 +++ /dev/null @@ -1,226 +0,0 @@ -#!/bin/execlineb -S0 - -# This file is executed (not as process 1!) as soon as s6-svscan -# starts, with the original stdin/out/err, but NOT the original -# environment. -# Purpose of this file: to perform all the one-time initialization tasks. - -# Merge environments from our custom stage into current context -s6-envdir -I /var/run/s6/env-stage2 - -# This env decides what to do if stage2 fails -backtick -D 0 -n S6_BEHAVIOUR_IF_STAGE2_FAILS { printcontenv S6_BEHAVIOUR_IF_STAGE2_FAILS } -importas -u S6_BEHAVIOUR_IF_STAGE2_FAILS S6_BEHAVIOUR_IF_STAGE2_FAILS - -# This env determines whether user provided files in /etc should be linked -# or copied into /var/run/s6 -backtick -D 0 -n S6_READ_ONLY_ROOT { printcontenv S6_READ_ONLY_ROOT } -importas -u S6_READ_ONLY_ROOT S6_READ_ONLY_ROOT - -# Docker Mods run logic -foreground -{ - /docker-mods -} - -foreground -{ - if - { - /etc/s6/init/init-stage2-redirfd - foreground - { - ## - ## copy user provided files to /var/run/s6/etc, depending on S6_RUNTIME_PROFILE env, - ## /etc (if not defined) or /etc/cont-profile.d/${S6_RUNTIME_PROFILE} will be used - ## as copying source. - ## - - if - { - if { s6-echo -n -- "[s6-init] making user provided files available at /var/run/s6/etc..." } - foreground - { - backtick -n S6_RUNTIME_PROFILE { printcontenv S6_RUNTIME_PROFILE } - importas -u S6_RUNTIME_PROFILE S6_RUNTIME_PROFILE - backtick -n S6_RUNTIME_PROFILE_SRC { - ifte { s6-echo "/etc/cont-profile.d/${S6_RUNTIME_PROFILE}" } { s6-echo "/etc" } - s6-test -n ${S6_RUNTIME_PROFILE} - } - importas -u S6_RUNTIME_PROFILE_SRC S6_RUNTIME_PROFILE_SRC - if { s6-rmrf /var/run/s6/etc } - if { s6-mkdir -pm 0755 /var/run/s6/etc } - forx i { "fix-attrs.d" "cont-init.d" "cont-finish.d" "services.d" } - importas -u i i - if { s6-test -d ${S6_RUNTIME_PROFILE_SRC}/${i} } - # although s6-hiercopy is prefered, and until it doesn't support 'follow symlinks' - # option, there is no clean way to allow symlinks between user provided runcoms. - ifelse { s6-test ${S6_READ_ONLY_ROOT} -eq 0 } { - s6-ln -s ${S6_RUNTIME_PROFILE_SRC}/${i} /var/run/s6/etc/${i} - } - if { s6-hiercopy ${S6_RUNTIME_PROFILE_SRC}/${i} /var/run/s6/etc/${i} } - } - importas -u ? ? - if { s6-echo -- "exited ${?}." } - ifelse { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -eq 0 } { exit 0 } - exit ${?} - } - - - ## - ## fix-attrs: ensure user-provided files have correct ownership & perms - ## - - if - { - if { s6-echo -n -- "[s6-init] ensuring user provided files have correct perms..." } - foreground { redirfd -r 0 /etc/s6/init/init-stage2-fixattrs.txt fix-attrs } - importas -u ? ? - if { s6-echo -- "exited ${?}." } - ifelse { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -eq 0 } { exit 0 } - exit ${?} - } - - - ## - ## fix-attrs.d: apply user-provided ownership & permission fixes - ## - - if - { - if -t { s6-test -d /var/run/s6/etc/fix-attrs.d } - if { s6-echo "[fix-attrs.d] applying ownership & permissions fixes..." } - if - { - pipeline { s6-ls -0 -- /var/run/s6/etc/fix-attrs.d } - pipeline { s6-sort -0 -- } - forstdin -0 -- i - importas -u i i - if { s6-echo -- "[fix-attrs.d] ${i}: applying... " } - foreground { redirfd -r 0 /var/run/s6/etc/fix-attrs.d/${i} fix-attrs } - importas -u ? ? - if { s6-echo -- "[fix-attrs.d] ${i}: exited ${?}." } - ifelse { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -eq 0 } { exit 0 } - exit ${?} - } - if { s6-echo -- "[fix-attrs.d] done." } - } - - ## - ## cont-init.d: one-time init scripts - ## - - if - { - if -t { s6-test -d /var/run/s6/etc/cont-init.d } - if { s6-echo "[cont-init.d] executing container initialization scripts..." } - if - { - pipeline { s6-ls -0 -- /var/run/s6/etc/cont-init.d } - pipeline { s6-sort -0 -- } - forstdin -o 0 -0 -- i - importas -u i i - if { s6-echo -- "[cont-init.d] ${i}: executing... " } - foreground { /var/run/s6/etc/cont-init.d/${i} } - importas -u ? ? - if { s6-echo -- "[cont-init.d] ${i}: exited ${?}." } - ifelse { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -eq 0 } { exit 0 } - exit ${?} - } - if { s6-echo -- "[cont-init.d] done." } - } - - ## - ## services.d: long-lived processes to be supervised - ## - - if - { - if -t { s6-test -d /var/run/s6/etc/services.d } - if { s6-echo "[services.d] starting services" } - if - { - pipeline { s6-ls -0 -- /var/run/s6/etc/services.d } - forstdin -0 -p -- i - importas -u i i - if { s6-test -d /var/run/s6/etc/services.d/${i} } - s6-hiercopy /var/run/s6/etc/services.d/${i} /var/run/s6/services/${i} - } - if { s6-svscanctl -a /var/run/s6/services } - if - { - # This envs decide if CMD should wait until services are up - backtick -D 0 -n S6_CMD_WAIT_FOR_SERVICES { printcontenv S6_CMD_WAIT_FOR_SERVICES } - importas -u S6_CMD_WAIT_FOR_SERVICES S6_CMD_WAIT_FOR_SERVICES - backtick -D 5000 -n S6_CMD_WAIT_FOR_SERVICES_MAXTIME { printcontenv S6_CMD_WAIT_FOR_SERVICES_MAXTIME } - importas -u S6_CMD_WAIT_FOR_SERVICES_MAXTIME S6_CMD_WAIT_FOR_SERVICES_MAXTIME - - if -t { if { s6-test ${S6_CMD_WAIT_FOR_SERVICES} -ne 0 } s6-test $# -ne 0 } - s6-maximumtime -t ${S6_CMD_WAIT_FOR_SERVICES_MAXTIME} - pipeline { s6-ls -0 -- /var/run/s6/etc/services.d } - forstdin -0 -o 0 -- i - importas -u i i - ifelse { s6-test -f /var/run/s6/services/${i}/down } { exit 0 } - ifelse { s6-test -f /var/run/s6/services/${i}/notification-fd } - { - s6-svwait -t ${S6_CMD_WAIT_FOR_SERVICES_MAXTIME} -U /var/run/s6/services/${i} - } - s6-svwait -t ${S6_CMD_WAIT_FOR_SERVICES_MAXTIME} -u /var/run/s6/services/${i} - } - if { s6-echo -- "[services.d] done." } - } - } - importas -u ? ? - ifelse { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -eq 0 } { exit 0 } - - # Make stage2 exit code available in stage3 - foreground { redirfd -w 1 /var/run/s6/env-stage3/S6_STAGE2_EXITED s6-echo -n -- "${?}" } - exit ${?} - } - - - ## - ## The init is complete, If the user has a given CMD, run it now, then - ## kill everything when it exits. - ## - - if -t { s6-test $# -ne 0 } - - foreground { - s6-setsid -gq -- with-contenv - backtick -D 0 -n S6_LOGGING { printcontenv S6_LOGGING } - importas S6_LOGGING S6_LOGGING - ifelse { s6-test ${S6_LOGGING} -eq 2 } - { - redirfd -w 1 /var/run/s6/uncaught-logs-fifo - fdmove -c 2 1 - $@ - } - $@ - } - - importas -u ? ? - - foreground { - /etc/s6/init/init-stage2-redirfd - s6-echo -- "[cmd] ${1} exited ${?}" - } - - # Make CMD exit code available in stage3 - foreground { redirfd -w 1 /var/run/s6/env-stage3/S6_STAGE2_EXITED s6-echo -n -- "${?}" } - - # Stop supervision tree - foreground { s6-svscanctl -t /var/run/s6/services } - - # Wait to be nuked - s6-pause -th - -} -importas -u ? ? -if { s6-test ${?} -ne 0 } -if { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -ne 0 } -ifelse { s6-test ${S6_BEHAVIOUR_IF_STAGE2_FAILS} -ne 1 } -{ - s6-svscanctl -t /var/run/s6/services -} -s6-echo -- "\n!!!!!\n init-stage2 failed.\n!!!!!" From dcbe92995c53147e93e791529292b3c97c12ce59 Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Sat, 23 Jan 2021 18:47:02 +0000 Subject: [PATCH 3/8] Bot Updating Package Versions --- package_versions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package_versions.txt b/package_versions.txt index 098a8ee..9cd9465 100755 --- a/package_versions.txt +++ b/package_versions.txt @@ -2,7 +2,7 @@ alpine-baselayout-3.2.0-r8 alpine-keys-2.2-r0 apk-tools-2.12.0-r4 bash-5.1.0-r0 -busybox-1.32.1-r0 +busybox-1.32.1-r2 ca-certificates-20191127-r5 ca-certificates-bundle-20191127-r5 coreutils-8.32-r2 @@ -25,7 +25,7 @@ s6-ipcserver-2.10.0.0-r0 scanelf-1.2.8-r0 shadow-4.8.1-r0 skalibs-2.10.0.0-r0 -ssl_client-1.32.1-r0 +ssl_client-1.32.1-r2 tzdata-2020f-r0 utmps-0.1.0.0-r0 xz-5.2.5-r0 From de01a5c2bf3bead35473d386dfe412562de37a06 Mon Sep 17 00:00:00 2001 From: Roxedus Date: Thu, 28 Jan 2021 13:00:49 +0100 Subject: [PATCH 4/8] Add warning regarding time being out of sync on armv7l Requires https://github.com/linuxserver/docker-documentation/pull/32 to be merged --- root/etc/cont-init.d/10-adduser | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/root/etc/cont-init.d/10-adduser b/root/etc/cont-init.d/10-adduser index 6efe28d..c489dfe 100644 --- a/root/etc/cont-init.d/10-adduser +++ b/root/etc/cont-init.d/10-adduser @@ -6,6 +6,20 @@ PGID=${PGID:-911} groupmod -o -g "$PGID" abc usermod -o -u "$PUID" abc +if [ "$(date +%Y)" == "1970" ] && [ "$(uname -m)" == "armv7l" ]; then + echo ' +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + +Your DockerHost is most likely running an outdated version of libseccomp + +To fix this, please visit https://docs.linuxserver.io/faq#libseccomp + +Some apps might not behave correctly without this + +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +' +fi + echo ' ------------------------------------- _ () From 680765e060b01860608221e8912d2f41136af2af Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Fri, 29 Jan 2021 09:54:02 -0500 Subject: [PATCH 5/8] Bot Updating Package Versions --- package_versions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package_versions.txt b/package_versions.txt index 9cd9465..4462dde 100755 --- a/package_versions.txt +++ b/package_versions.txt @@ -1,6 +1,6 @@ alpine-baselayout-3.2.0-r8 alpine-keys-2.2-r0 -apk-tools-2.12.0-r4 +apk-tools-2.12.1-r0 bash-5.1.0-r0 busybox-1.32.1-r2 ca-certificates-20191127-r5 @@ -26,7 +26,7 @@ scanelf-1.2.8-r0 shadow-4.8.1-r0 skalibs-2.10.0.0-r0 ssl_client-1.32.1-r2 -tzdata-2020f-r0 +tzdata-2021a-r0 utmps-0.1.0.0-r0 xz-5.2.5-r0 xz-libs-5.2.5-r0 From e5d676ef7c0ae35cc0e91ea2ed4f183f055e50aa Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Tue, 16 Feb 2021 06:28:23 +0000 Subject: [PATCH 6/8] Bot Updating Templated Files --- Jenkinsfile | 71 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3984e15..6b4fe40 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -229,10 +229,53 @@ pipeline { TEMPDIR=$(mktemp -d) docker pull ghcr.io/linuxserver/jenkins-builder:latest docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest + # Stage 1 - Jenkinsfile update + if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then + 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 + cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ + git add Jenkinsfile + 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} + echo "Updating Jenkinsfile" + rm -Rf ${TEMPDIR} + exit 0 + else + echo "Jenkinsfile is up to date." + fi + # Stage 2 - Delete old templates + OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md" + for i in ${OLD_TEMPLATES}; do + if [[ -f "${i}" ]]; then + TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}" + fi + done + if [[ -n "${TEMPLATES_TO_DELETE}" ]]; then + 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 + cd ${TEMPDIR}/docker-${CONTAINER_NAME} + for i in ${TEMPLATES_TO_DELETE}; do + git rm "${i}" + done + 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} + echo "Deleting old templates" + rm -Rf ${TEMPDIR} + exit 0 + else + echo "No templates to delete" + fi + # Stage 3 - Update templates 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 + if [[ "${CURRENTHASH}" != "${NEWHASH}" ]] || ! grep -q '.jenkins-external' "${WORKSPACE}/.gitignore" 2>/dev/null; then mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} @@ -240,11 +283,13 @@ pipeline { cd ${TEMPDIR}/docker-${CONTAINER_NAME} mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE - rm -f ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE.md cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || : cd ${TEMPDIR}/repo/${LS_REPO}/ + if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then + echo ".jenkins-external" >> .gitignore + git add .gitignore + fi git add ${TEMPLATED_FILES} - git rm .github/ISSUE_TEMPLATE.md || : 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} @@ -253,8 +298,8 @@ pipeline { fi mkdir -p ${TEMPDIR}/gitbook git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation - if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -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/ + if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -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}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then + cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/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 Documentation' @@ -479,7 +524,7 @@ pipeline { } sh '''#! /bin/bash set -e - docker pull ghcr.io/linuxserver/lsiodev-ci:latest + docker pull ghcr.io/linuxserver/ci:latest if [ "${MULTIARCH}" == "true" ]; then docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} @@ -504,7 +549,7 @@ pipeline { -e WEB_PATH=\"${CI_WEBPATH}\" \ -e DO_REGION="ams3" \ -e DO_BUCKET="lsio-ci" \ - -t ghcr.io/linuxserver/lsiodev-ci:latest \ + -t ghcr.io/linuxserver/ci:latest \ python /ci/ci.py''' } } @@ -646,9 +691,9 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - echo "Pushing New tag for current commit ${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}" + echo "Pushing New tag for current commit ${META_TAG}" 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}'",\ + -d '{"tag":"'${META_TAG}'",\ "object": "'${COMMIT_SHA}'",\ "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\ "type": "commit",\ @@ -656,9 +701,9 @@ pipeline { echo "Pushing New release for Tag" sh '''#! /bin/bash echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json - echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ + echo '{"tag_name":"'${META_TAG}'",\ "target_commitish": "master",\ - "name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\ + "name": "'${META_TAG}'",\ "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start printf '","draft": false,"prerelease": false}' >> releasebody.json paste -d'\\0' start releasebody.json > releasebody.json.done @@ -685,7 +730,7 @@ pipeline { TEMPDIR=$(mktemp -d) docker pull ghcr.io/linuxserver/jenkins-builder:latest docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest - docker pull ghcr.io/linuxserver/lsiodev-readme-sync + docker pull ghcr.io/linuxserver/readme-sync docker run --rm=true \ -e DOCKERHUB_USERNAME=$DOCKERUSER \ -e DOCKERHUB_PASSWORD=$DOCKERPASS \ @@ -693,7 +738,7 @@ pipeline { -e DOCKER_REPOSITORY=${IMAGE} \ -e GIT_BRANCH=master \ -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ - ghcr.io/linuxserver/lsiodev-readme-sync bash -c 'node sync' + ghcr.io/linuxserver/readme-sync bash -c 'node sync' rm -Rf ${TEMPDIR} ''' } } From 22219c08e88409f8ebebadd78131c0bd2a6255ab Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Tue, 16 Feb 2021 06:29:30 +0000 Subject: [PATCH 7/8] Bot Updating Templated Files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 96374c4..6e8ad97 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ $RECYCLE.BIN/ Network Trash Folder Temporary Items .apdisk +.jenkins-external From 990d14040d9e864c05361957c8408693134d46a7 Mon Sep 17 00:00:00 2001 From: LinuxServer-CI Date: Tue, 16 Feb 2021 06:33:24 +0000 Subject: [PATCH 8/8] Bot Updating Package Versions --- package_versions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package_versions.txt b/package_versions.txt index 4462dde..ea76057 100755 --- a/package_versions.txt +++ b/package_versions.txt @@ -2,7 +2,7 @@ alpine-baselayout-3.2.0-r8 alpine-keys-2.2-r0 apk-tools-2.12.1-r0 bash-5.1.0-r0 -busybox-1.32.1-r2 +busybox-1.32.1-r3 ca-certificates-20191127-r5 ca-certificates-bundle-20191127-r5 coreutils-8.32-r2 @@ -25,7 +25,7 @@ s6-ipcserver-2.10.0.0-r0 scanelf-1.2.8-r0 shadow-4.8.1-r0 skalibs-2.10.0.0-r0 -ssl_client-1.32.1-r2 +ssl_client-1.32.1-r3 tzdata-2021a-r0 utmps-0.1.0.0-r0 xz-5.2.5-r0