Compare commits

...

81 Commits

Author SHA1 Message Date
LinuxServer-CI
b78e6966a3 Bot Updating Package Versions 2024-06-13 21:16:40 +00:00
LinuxServer-CI
10277f6ab8 Bot Updating Package Versions 2024-06-11 10:36:11 +00:00
LinuxServer-CI
a4cfb9ba00 Bot Updating Package Versions 2024-05-28 10:34:52 +00:00
LinuxServer-CI
b5a49c95b9 Bot Updating Package Versions 2024-05-21 10:53:15 +00:00
LinuxServer-CI
3e3513ee1f Bot Updating Templated Files 2024-05-21 10:50:47 +00:00
LinuxServer-CI
d076799e74 Bot Updating Templated Files 2024-05-21 10:49:09 +00:00
LinuxServer-CI
de4f2e06d9 Bot Updating Templated Files 2024-05-21 10:32:00 +00:00
LinuxServer-CI
c41139d8b0 Bot Updating Package Versions 2024-05-14 21:14:46 +00:00
LinuxServer-CI
13d281cddd Bot Updating Package Versions 2024-05-14 10:36:01 +00:00
LinuxServer-CI
897c15f760 Bot Updating Templated Files 2024-05-14 10:33:40 +00:00
LinuxServer-CI
49165bf633 Bot Updating Package Versions 2024-05-07 10:37:37 +00:00
LinuxServer-CI
69f85214d5 Bot Updating Templated Files 2024-05-07 10:33:27 +00:00
LinuxServer-CI
e931494071 Bot Updating Package Versions 2024-04-30 10:32:10 +00:00
LinuxServer-CI
841d52fc86 Bot Updating Package Versions 2024-04-23 10:32:29 +00:00
LinuxServer-CI
cb5c9b8111 Bot Updating Package Versions 2024-04-16 12:26:46 +00:00
LinuxServer-CI
be30a606d9 Bot Updating Package Versions 2024-04-16 10:31:08 +00:00
LinuxServer-CI
776bb25bf7 Bot Updating Package Versions 2024-04-09 10:35:55 +00:00
LinuxServer-CI
7f98ad2352 Bot Updating Package Versions 2024-03-29 20:04:16 +00:00
LinuxServer-CI
e5108b6b9a Bot Updating Package Versions 2024-03-26 10:33:45 +00:00
LinuxServer-CI
9d746b7a58 Bot Updating Package Versions 2024-03-19 10:32:43 +00:00
LinuxServer-CI
7f0a11f194 Bot Updating Templated Files 2024-03-19 10:30:15 +00:00
LinuxServer-CI
361c224810 Bot Updating Package Versions 2024-03-12 10:34:27 +00:00
LinuxServer-CI
2b98bc1130 Bot Updating Package Versions 2024-03-05 10:33:07 +00:00
LinuxServer-CI
f29dd4a2d2 Bot Updating Templated Files 2024-02-27 10:33:49 +00:00
LinuxServer-CI
0891066012 Bot Updating Templated Files 2024-02-27 10:31:15 +00:00
LinuxServer-CI
1d9d237ac6 Bot Updating Package Versions 2024-02-20 10:33:40 +00:00
LinuxServer-CI
96b4f67778 Bot Updating Package Versions 2024-02-13 10:32:31 +00:00
LinuxServer-CI
33d58cc41f Bot Updating Package Versions 2024-02-06 10:32:39 +00:00
LinuxServer-CI
651d26fd9e Bot Updating Package Versions 2024-01-30 10:32:37 +00:00
LinuxServer-CI
ad00ae6b25 Bot Updating Package Versions 2024-01-23 10:34:17 +00:00
LinuxServer-CI
1d8e6ded34 Bot Updating Package Versions 2024-01-16 10:39:01 +00:00
LinuxServer-CI
c94de7d060 Bot Updating Templated Files 2024-01-16 10:36:37 +00:00
LinuxServer-CI
fab1d0578a Bot Updating Templated Files 2024-01-16 10:33:31 +00:00
LinuxServer-CI
1dde688650 Bot Updating Package Versions 2024-01-09 10:33:33 +00:00
LinuxServer-CI
43569603c8 Bot Updating Package Versions 2024-01-02 10:32:21 +00:00
LinuxServer-CI
548d62e5fe Bot Updating Package Versions 2023-12-26 10:33:32 +00:00
LinuxServer-CI
0d5a224ccc Bot Updating Package Versions 2023-12-19 10:34:16 +00:00
LinuxServer-CI
9d3b2caa2f Bot Updating Package Versions 2023-12-12 10:34:31 +00:00
LinuxServer-CI
928cb57631 Bot Updating Package Versions 2023-12-08 18:19:47 +00:00
LinuxServer-CI
6bfae65164 Bot Updating Package Versions 2023-12-05 10:35:07 +00:00
LinuxServer-CI
17bfb9a85b Bot Updating Package Versions 2023-11-28 10:34:38 +00:00
LinuxServer-CI
8441fac1cd Bot Updating Package Versions 2023-11-21 10:42:32 +00:00
LinuxServer-CI
97ac2d0759 Bot Updating Templated Files 2023-11-21 10:39:08 +00:00
LinuxServer-CI
24b82ae1bb Bot Updating Package Versions 2023-11-12 17:52:48 +00:00
Eric Nemchik
108f4677b0 Merge pull request #254 from linuxserver/standard-cron
standard cron
2023-11-12 11:49:49 -06:00
LinuxServer-CI
94238ec4b1 Bot Updating Package Versions 2023-11-07 10:32:20 +00:00
LinuxServer-CI
8c094ee356 Bot Updating Package Versions 2023-10-31 10:35:18 +00:00
LinuxServer-CI
1f4eec76d5 Bot Updating Package Versions 2023-10-24 10:33:54 +00:00
LinuxServer-CI
b62dd78598 Bot Updating Package Versions 2023-10-17 10:34:16 +00:00
LinuxServer-CI
4f62144bdb Bot Updating Package Versions 2023-10-10 10:33:05 +00:00
LinuxServer-CI
d4f8db4f1f Bot Updating Package Versions 2023-10-08 02:37:57 +00:00
LinuxServer-CI
86e448c624 Bot Updating Templated Files 2023-10-08 02:34:44 +00:00
LinuxServer-CI
8549393003 Bot Updating Templated Files 2023-10-08 02:33:20 +00:00
Roxedus
920e7de968 Merge pull request #259 from linuxserver/unrar 2023-10-08 04:30:53 +02:00
aptalca
c52be375b3 remove obsolete arg 2023-10-07 20:52:37 -04:00
aptalca
c755500a5a install unrar from lsio repo 2023-10-07 20:51:56 -04:00
LinuxServer-CI
882a787357 Bot Updating Package Versions 2023-10-03 10:34:04 +00:00
LinuxServer-CI
ed573643f1 Bot Updating Package Versions 2023-09-26 10:32:48 +00:00
LinuxServer-CI
d2ba673849 Bot Updating Package Versions 2023-09-19 10:34:13 +00:00
LinuxServer-CI
c854898c22 Bot Updating Package Versions 2023-09-12 10:32:23 +00:00
LinuxServer-CI
965c79c3e8 Bot Updating Package Versions 2023-09-05 10:31:42 +00:00
LinuxServer-CI
1ac66ddc8c Bot Updating Package Versions 2023-08-30 06:19:00 +00:00
LinuxServer-CI
b9c5cec111 Bot Updating Package Versions 2023-08-29 10:31:52 +00:00
Eric Nemchik
e20c68e5f6 Move crontabs to etc
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-19 10:17:49 -05:00
Eric Nemchik
540a30a245 cron in base
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-18 23:21:50 -05:00
Eric Nemchik
4b6dcf748c cron in base
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-08-18 23:07:49 -05:00
LinuxServer-CI
3a1ad52e23 Bot Updating Package Versions 2023-08-15 10:31:39 +00:00
LinuxServer-CI
302cb6137a Bot Updating Templated Files 2023-08-10 21:05:32 +00:00
Adam
11d2e3b61a Merge pull request #255 from linuxserver/master-unrar 2023-08-10 22:03:19 +01:00
TheSpad
0ff8ff04d5 Bump unrar to 6.2.10 2023-08-10 17:54:17 +01:00
LinuxServer-CI
38859997aa Bot Updating Package Versions 2023-08-08 10:32:44 +00:00
LinuxServer-CI
3cb761689c Bot Updating Package Versions 2023-07-31 20:15:32 +00:00
LinuxServer-CI
bae31afddb Bot Updating Package Versions 2023-07-31 18:19:34 +00:00
Eric Nemchik
bed6a80004 Fix perms
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-07-30 09:50:28 -05:00
Eric Nemchik
c73d76e4c6 standard cron
Signed-off-by: Eric Nemchik <eric@nemchik.com>
2023-07-30 01:18:19 -05:00
LinuxServer-CI
4fbe981509 Bot Updating Package Versions 2023-07-30 01:10:49 +00:00
LinuxServer-CI
bb807f43d5 Bot Updating Package Versions 2023-07-25 10:33:53 +00:00
LinuxServer-CI
8b00f02b3b Bot Updating Package Versions 2023-07-18 10:34:56 +00:00
LinuxServer-CI
a23c29e5d8 Bot Updating Package Versions 2023-07-11 10:37:16 +00:00
LinuxServer-CI
e68202edfb Bot Updating Package Versions 2023-07-04 10:40:41 +00:00
LinuxServer-CI
0eb180ec99 Bot Updating Templated Files 2023-07-04 10:36:31 +00:00
23 changed files with 331 additions and 314 deletions

View File

@@ -67,10 +67,10 @@ body:
- type: textarea
attributes:
description: |
Provide a full docker log, output of "docker logs linuxserver.io"
Provide a full docker log, output of "docker logs transmission"
label: Container logs
placeholder: |
Output of `docker logs linuxserver.io`
Output of `docker logs transmission`
render: bash
validations:
required: true

View File

@@ -7,7 +7,7 @@ jobs:
external-trigger-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
- name: External Trigger
if: github.ref == 'refs/heads/master'

View File

@@ -9,7 +9,7 @@ jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'

View File

@@ -7,7 +7,7 @@ jobs:
package-trigger-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
- name: Package Trigger
if: github.ref == 'refs/heads/master'

View File

@@ -9,7 +9,7 @@ jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4.1.1
with:
fetch-depth: '0'

View File

@@ -1,8 +1,9 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/unrar:latest as unrar
FROM ghcr.io/linuxserver/baseimage-alpine:edge
ARG UNRAR_VERSION=6.2.8
ARG BUILD_DATE
ARG VERSION
ARG TRANSMISSION_VERSION
@@ -18,17 +19,6 @@ RUN \
findutils \
p7zip \
python3 && \
echo "**** install unrar from source ****" && \
mkdir /tmp/unrar && \
curl -o \
/tmp/unrar.tar.gz -L \
"https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \
tar xf \
/tmp/unrar.tar.gz -C \
/tmp/unrar --strip-components=1 && \
cd /tmp/unrar && \
make && \
install -v -m755 unrar /usr/local/bin && \
echo "**** install transmission ****" && \
if [ -z ${TRANSMISSION_VERSION+x} ]; then \
TRANSMISSION_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
@@ -49,6 +39,9 @@ RUN \
# copy local files
COPY root/ /
# add unrar
COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar
# ports and volumes
EXPOSE 9091 51413/tcp 51413/udp
VOLUME /config

View File

@@ -1,8 +1,9 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/unrar:arm64v8-latest as unrar
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge
ARG UNRAR_VERSION=6.2.8
ARG BUILD_DATE
ARG VERSION
ARG TRANSMISSION_VERSION
@@ -18,17 +19,6 @@ RUN \
findutils \
p7zip \
python3 && \
echo "**** install unrar from source ****" && \
mkdir /tmp/unrar && \
curl -o \
/tmp/unrar.tar.gz -L \
"https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz" && \
tar xf \
/tmp/unrar.tar.gz -C \
/tmp/unrar --strip-components=1 && \
cd /tmp/unrar && \
make && \
install -v -m755 unrar /usr/local/bin && \
echo "**** install transmission ****" && \
if [ -z ${TRANSMISSION_VERSION+x} ]; then \
TRANSMISSION_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
@@ -49,6 +39,9 @@ RUN \
# copy local files
COPY root/ /
# add unrar
COPY --from=unrar /usr/bin/unrar-alpine /usr/bin/unrar
# ports and volumes
EXPOSE 9091 51413/tcp 51413/udp
VOLUME /config

284
Jenkinsfile vendored
View File

@@ -16,7 +16,7 @@ pipeline {
GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
SCARF_TOKEN=credentials('scarf_api_key')
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
BUILD_VERSION_ARG = 'TRANSMISSION_VERSION'
LS_USER = 'linuxserver'
LS_REPO = 'docker-transmission'
@@ -62,11 +62,16 @@ pipeline {
env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''',
returnStdout: true).trim()
env.GH_DEFAULT_BRANCH = sh(
script: '''git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||' ''',
returnStdout: true).trim()
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.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
}
sh '''#! /bin/bash
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
script{
env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
@@ -125,7 +130,7 @@ pipeline {
steps{
script{
env.EXT_RELEASE_CLEAN = sh(
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''',
script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/ ]//g' ''',
returnStdout: true).trim()
def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/
@@ -143,7 +148,7 @@ pipeline {
}
if (env.SEMVER != null) {
if (BRANCH_NAME != "master" && BRANCH_NAME != "main") {
if (BRANCH_NAME != "${env.GH_DEFAULT_BRANCH}") {
env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}"
}
println("SEMVER: ${env.SEMVER}")
@@ -244,9 +249,11 @@ pipeline {
-v ${WORKSPACE}:/mnt \
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
apk add --no-cache py3-pip && \
pip install s3cmd && \
ghcr.io/linuxserver/baseimage-alpine:3.19 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 && \
pip install --no-cache-dir s3cmd && \
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
}
}
@@ -265,8 +272,15 @@ pipeline {
set -e
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
# Cloned repo paths for templating:
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch master of ${LS_USER}/${LS_REPO} for running the jenkins builder on
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch master of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
# ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github
# ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos
# ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github
git clone --branch master --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest
echo "Starting 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}
@@ -275,15 +289,16 @@ pipeline {
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
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating Jenkinsfile"
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "Jenkinsfile is up to date."
fi
# Stage 2 - Delete old templates
echo "Starting Stage 2 - Delete old templates"
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml"
for i in ${OLD_TEMPLATES}; do
if [[ -f "${i}" ]]; then
@@ -299,15 +314,16 @@ pipeline {
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
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Deleting old and deprecated templates"
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "No templates to delete"
fi
# Stage 3 - Update templates
echo "Starting 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)
@@ -320,26 +336,42 @@ pipeline {
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || :
cp --parents readme-vars.yml ${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 add readme-vars.yml ${TEMPLATED_FILES}
git commit -m 'Bot Updating Templated Files'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "Updating templates and exiting build, new one will trigger based on commit"
rm -Rf ${TEMPDIR}
exit 0
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
echo "No templates to update"
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}/.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
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
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
GH_DOCS_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||')
git add docs/images/docker-${CONTAINER_NAME}.md
echo "Updating docs repo"
git commit -m 'Bot Updating Documentation'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} || \
(MAXWAIT="10" && echo "Push to docs failed, trying again in ${MAXWAIT} seconds" && \
sleep $((RANDOM % MAXWAIT)) && \
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase && \
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH})
else
echo "Docs update not needed, skipping"
fi
mkdir -p ${TEMPDIR}/unraid
git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates
@@ -349,9 +381,13 @@ pipeline {
elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then
sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml
fi
if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then
echo "Updating Unraid template"
cd ${TEMPDIR}/unraid/templates/
if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then
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
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
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
@@ -362,7 +398,42 @@ pipeline {
git add unraid/${CONTAINER_NAME}.xml
git commit -m 'Bot Updating Unraid Template'
fi
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} || \
(MAXWAIT="10" && echo "Push to unraid templates failed, trying again in ${MAXWAIT} seconds" && \
sleep $((RANDOM % MAXWAIT)) && \
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase && \
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH})
else
echo "No updates to Unraid template needed, skipping"
fi
if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]]; then
if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) -gt 25000 ]]; then
echo "Readme is longer than 25,000 characters. Syncing the lite version to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/README.lite"
else
echo "Syncing readme to Docker Hub"
DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/README.md"
fi
if curl -s https://hub.docker.com/v2/namespaces/${DOCKERHUB_IMAGE%%/*}/repositories/${DOCKERHUB_IMAGE##*/}/tags | jq -r '.message' | grep -q 404; then
echo "Docker Hub endpoint doesn't exist. Creating endpoint first."
DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"'${DOCKERHUB_IMAGE##*/}'", "namespace":"'${DOCKERHUB_IMAGE%%/*}'"}' \
https://hub.docker.com/v2/repositories/ || :
fi
DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token')
curl -s \
-H "Authorization: JWT ${DH_TOKEN}" \
-H "Content-Type: application/json" \
-X PATCH \
-d "{\\"full_description\\":$(jq -Rsa . ${DH_README_SYNC_PATH})}" \
https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE} || :
else
echo "Not the default Github branch. Skipping readme sync to Docker Hub."
fi
rm -Rf ${TEMPDIR}'''
script{
@@ -418,43 +489,16 @@ pipeline {
}
steps{
sh '''curl -H "Content-Type: application/json" -H "Private-Token: ${GITLAB_TOKEN}" -X POST https://gitlab.com/api/v4/projects \
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"visibility":"public"}' '''
}
}
/* #######################
Scarf.sh package registry
####################### */
// Add package to Scarf.sh and set permissions
stage("Scarf.sh package registry"){
when {
branch "master"
environment name: 'EXIT_STATUS', value: ''
}
steps{
sh '''#! /bin/bash
PACKAGE_UUID=$(curl -X GET -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="linuxserver/transmission") | .uuid' || :)
if [ -z "${PACKAGE_UUID}" ]; then
echo "Adding package to Scarf.sh"
curl -sX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages \
-H "Authorization: Bearer ${SCARF_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"name":"linuxserver/transmission",\
"shortDescription":"example description",\
"libraryType":"docker",\
"website":"https://github.com/linuxserver/docker-transmission",\
"backendUrl":"https://ghcr.io/linuxserver/transmission",\
"publicUrl":"https://lscr.io/linuxserver/transmission"}' || :
else
echo "Package already exists on Scarf.sh"
fi
'''
-d '{"namespace_id":'${GITLAB_NAMESPACE}',\
"name":"'${LS_REPO}'",
"mirror":true,\
"import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\
"issues_access_level":"disabled",\
"merge_requests_access_level":"disabled",\
"repository_access_level":"enabled",\
"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" '''
}
}
/* ###############
@@ -485,6 +529,7 @@ pipeline {
--label \"org.opencontainers.image.title=Transmission\" \
--label \"org.opencontainers.image.description=[Transmission](https://www.transmissionbt.com/) is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more.\" \
--no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
@@ -516,6 +561,7 @@ pipeline {
--label \"org.opencontainers.image.title=Transmission\" \
--label \"org.opencontainers.image.description=[Transmission](https://www.transmissionbt.com/) is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more.\" \
--no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \
--provenance=false --sbom=false \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
@@ -544,6 +590,7 @@ pipeline {
--label \"org.opencontainers.image.title=Transmission\" \
--label \"org.opencontainers.image.description=[Transmission](https://www.transmissionbt.com/) is designed for easy, powerful use. Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more.\" \
--no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \
--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) {
@@ -570,7 +617,7 @@ pipeline {
sh '''#! /bin/bash
set -e
TEMPDIR=$(mktemp -d)
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then
if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" != "true" ]; then
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
else
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
@@ -591,7 +638,8 @@ pipeline {
wait
git add package_versions.txt
git commit -m 'Bot Updating Package Versions'
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git master
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
echo "Package tag updated, stopping build process"
else
@@ -666,7 +714,7 @@ pipeline {
--shm-size=1gb \
-v /var/run/docker.sock:/var/run/docker.sock \
-e IMAGE=\"${IMAGE}\" \
-e DELAY_START=\"${CI_DELAY}\" \
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e PORT=\"${CI_PORT}\" \
@@ -694,12 +742,6 @@ pipeline {
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
],
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
@@ -710,7 +752,7 @@ pipeline {
retry(5) {
sh '''#! /bin/bash
set -e
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
@@ -741,12 +783,6 @@ pipeline {
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
],
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'Quay.io-Robot',
@@ -757,7 +793,7 @@ pipeline {
retry(5) {
sh '''#! /bin/bash
set -e
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
@@ -786,35 +822,13 @@ pipeline {
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
docker manifest push --purge ${MANIFESTIMAGE}:latest || :
docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest
docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || :
docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8
done
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker buildx imagetools create -t ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm64v8-latest
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER} || :
docker manifest create ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
fi
token=$(curl -sX GET "https://ghcr.io/token?scope=repository%3Alinuxserver%2F${CONTAINER_NAME}%3Apull" | jq -r '.token')
digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/linuxserver/${CONTAINER_NAME}/manifests/arm32v7-latest")
if [[ $(echo "$digest" | jq -r '.layers') != "null" ]]; then
docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-latest || :
docker manifest create ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:amd64-latest
docker manifest push --purge ${MANIFESTIMAGE}:arm32v7-latest
fi
docker manifest push --purge ${MANIFESTIMAGE}:latest
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker manifest push --purge ${MANIFESTIMAGE}:${SEMVER}
docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
done
'''
@@ -852,37 +866,39 @@ pipeline {
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
}
}
// Use helper container to sync the current README on master to the dockerhub endpoint
stage('Sync-README') {
// Add protection to the release branch
stage('Github-Release-Branch-Protection') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
set -e
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/readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
-v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \
ghcr.io/linuxserver/readme-sync bash -c 'node sync'
rm -Rf ${TEMPDIR} '''
}
echo "Setting up protection for release branch master"
sh '''#! /bin/bash
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/master/protection \
-d $(jq -c . << EOF
{
"required_status_checks": null,
"enforce_admins": false,
"required_pull_request_reviews": {
"dismiss_stale_reviews": false,
"require_code_owner_reviews": false,
"require_last_push_approval": false,
"required_approving_review_count": 1
},
"restrictions": null,
"required_linear_history": false,
"allow_force_pushes": false,
"allow_deletions": false,
"block_creations": false,
"required_conversation_resolution": true,
"lock_branch": false,
"allow_fork_syncing": false,
"required_signatures": false
}
EOF
) '''
}
}
// If this is a Pull request send the CI link as a comment on it

143
README.md
View File

@@ -1,6 +1,5 @@
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read the https://github.com/linuxserver/docker-transmission/blob/master/.github/CONTRIBUTING.md -->
<!-- DO NOT EDIT THIS FILE MANUALLY -->
<!-- Please read https://github.com/linuxserver/docker-transmission/blob/master/.github/CONTRIBUTING.md -->
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
@@ -29,7 +28,7 @@ Find us at:
# [linuxserver/transmission](https://github.com/linuxserver/docker-transmission)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Ftransmission?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh/gateway/linuxserver-ci/docker/linuxserver%2Ftransmission)
[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Ftransmission?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh)
[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-transmission.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-transmission)
[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-transmission.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-transmission/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-transmission/packages)
@@ -46,7 +45,7 @@ Find us at:
## Supported Architectures
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
Simply pulling `lscr.io/linuxserver/transmission:latest` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
@@ -86,13 +85,12 @@ Use `PEERPORT` to specify the port(s) Transmission should listen on. This disab
## Usage
Here are some example snippets to help you get started creating a container.
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
```yaml
---
version: "2.1"
services:
transmission:
image: lscr.io/linuxserver/transmission:latest
@@ -140,12 +138,11 @@ docker run -d \
-v /path/to/watch/folder:/watch \
--restart unless-stopped \
lscr.io/linuxserver/transmission:latest
```
## Parameters
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
| Parameter | Function |
| :----: | --- |
@@ -172,10 +169,10 @@ You can set any environment variable from a file by using a special prepend `FIL
As an example:
```bash
-e FILE__PASSWORD=/run/secrets/mysecretpassword
-e FILE__MYVAR=/run/secrets/mysecretvariable
```
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
## Umask for running applications
@@ -184,15 +181,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
## User / Group Identifiers
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
```bash
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
id your_user
```
Example output:
```text
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
```
## Docker Mods
@@ -203,53 +205,100 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
## Support Info
* Shell access whilst the container is running: `docker exec -it transmission /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f transmission`
* container version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' transmission`
* image version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/transmission:latest`
* Shell access whilst the container is running:
```bash
docker exec -it transmission /bin/bash
```
* To monitor the logs of the container in realtime:
```bash
docker logs -f transmission
```
* Container version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' transmission
```
* Image version number:
```bash
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/transmission:latest
```
## Updating Info
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image.
Below are the instructions for updating containers:
### Via Docker Compose
* Update all images: `docker-compose pull`
* or update a single image: `docker-compose pull transmission`
* Let compose update all containers as necessary: `docker-compose up -d`
* or update a single container: `docker-compose up -d transmission`
* You can also remove the old dangling images: `docker image prune`
* Update images:
* All images:
```bash
docker-compose pull
```
* Single image:
```bash
docker-compose pull transmission
```
* Update containers:
* All containers:
```bash
docker-compose up -d
```
* Single container:
```bash
docker-compose up -d transmission
```
* You can also remove the old dangling images:
```bash
docker image prune
```
### Via Docker Run
* Update the image: `docker pull lscr.io/linuxserver/transmission:latest`
* Stop the running container: `docker stop transmission`
* Delete the container: `docker rm transmission`
* Update the image:
```bash
docker pull lscr.io/linuxserver/transmission:latest
```
* Stop the running container:
```bash
docker stop transmission
```
* Delete the container:
```bash
docker rm transmission
```
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
* You can also remove the old dangling images: `docker image prune`
* You can also remove the old dangling images:
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
* Pull the latest image at its tag and replace it with the same env variables in one run:
```bash
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--run-once transmission
```
* You can also remove the old dangling images: `docker image prune`
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
```bash
docker image prune
```
### Image Update Notifications - Diun (Docker Image Update Notifier)
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
## Building locally
@@ -274,6 +323,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **07.10.23:** - Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar).
* **10.08.23:** - Bump unrar to 6.2.10.
* **10.06.23:** - Bump unrar to 6.2.8, install transmission-extra.
* **25.05.23:** - Deprecate armhf.
* **14.05.23:** - Explicitly install transmission-remote.

View File

@@ -1,73 +1,72 @@
NAME VERSION TYPE
7zip 22.01-r5 apk
alpine-baselayout 3.4.3-r1 apk
alpine-baselayout-data 3.4.3-r1 apk
7zip 23.01-r0 apk
alpine-baselayout 3.6.5-r0 apk
alpine-baselayout-data 3.6.5-r0 apk
alpine-keys 2.4-r1 apk
apk-tools 2.14.0-r5 apk
bash 5.2.15-r5 apk
brotli-libs 1.0.9-r15 apk
busybox 1.36.1 binary
busybox 1.36.1-r1 apk
busybox-binsh 1.36.1-r1 apk
c-ares 1.19.1-r1 apk
ca-certificates 20230506-r0 apk
ca-certificates-bundle 20230506-r0 apk
coreutils 9.3-r7 apk
coreutils-env 9.3-r7 apk
coreutils-fmt 9.3-r7 apk
coreutils-sha512sum 9.3-r7 apk
curl 8.1.2-r1 apk
apk-tools 2.14.4-r0 apk
bash 5.2.26-r0 apk
brotli-libs 1.1.0-r2 apk
busybox 1.36.1-r31 apk
busybox-binsh 1.36.1-r31 apk
c-ares 1.28.1-r0 apk
ca-certificates 20240226-r0 apk
ca-certificates-bundle 20240226-r0 apk
catatonit 0.2.0-r0 apk
coreutils 9.5-r1 apk
coreutils-env 9.5-r1 apk
coreutils-fmt 9.5-r1 apk
coreutils-sha512sum 9.5-r1 apk
curl 8.8.0-r0 apk
findutils 4.9.0-r5 apk
gdbm 1.23-r1 apk
jq 1.6-r3 apk
libacl 2.3.1-r4 apk
libattr 2.5.1-r5 apk
libbsd 0.11.7-r2 apk
jq 1.7.1-r0 apk
libacl 2.3.2-r0 apk
libattr 2.5.2-r0 apk
libbsd 0.12.2-r0 apk
libbz2 1.0.8-r6 apk
libc-utils 0.7.2-r5 apk
libcrypto3 3.1.1-r1 apk
libcurl 8.1.2-r1 apk
libdeflate 1.18-r1 apk
libcrypto3 3.3.1-r0 apk
libcurl 8.8.0-r0 apk
libdeflate 1.20-r0 apk
libevent 2.1.12-r7 apk
libexpat 2.5.0-r2 apk
libffi 3.4.4-r3 apk
libgcc 13.1.1_git20230617-r0 apk
libidn2 2.3.4-r2 apk
libintl 0.22-r0 apk
libexpat 2.6.2-r0 apk
libffi 3.4.6-r0 apk
libgcc 13.2.1_git20240309-r0 apk
libidn2 2.3.7-r0 apk
libintl 0.22.5-r0 apk
libmd 1.1.0-r0 apk
libncursesw 6.4_p20230625-r0 apk
libpanelw 6.4_p20230625-r0 apk
libproc2 4.0.3-r2 apk
libpsl 0.21.2-r1 apk
libssl3 3.1.1-r1 apk
libstdc++ 13.1.1_git20230617-r0 apk
libunistring 1.1-r2 apk
linux-pam 1.5.3-r2 apk
miniupnpc 2.2.5-r0 apk
mpdecimal 2.5.1-r2 apk
musl 1.2.4-r1 apk
musl-utils 1.2.4-r1 apk
ncurses-terminfo-base 6.4_p20230625-r0 apk
netcat-openbsd 1.225-r0 apk
nghttp2-libs 1.54.0-r0 apk
oniguruma 6.9.8-r1 apk
procps-ng 4.0.3-r2 apk
pyc 0.1-r0 apk
python 3.11.4 binary
python3 3.11.4-r0 apk
python3-pyc 3.11.4-r0 apk
python3-pycache-pyc0 3.11.4-r0 apk
readline 8.2.1-r2 apk
libncursesw 6.4_p20240420-r0 apk
libpanelw 6.4_p20240420-r0 apk
libproc2 4.0.4-r0 apk
libpsl 0.21.5-r1 apk
libssl3 3.3.1-r0 apk
libstdc++ 13.2.1_git20240309-r0 apk
libunistring 1.2-r0 apk
linux-pam 1.6.0-r0 apk
miniupnpc 2.2.8-r0 apk
mpdecimal 4.0.0-r0 apk
musl 1.2.5-r1 apk
musl-utils 1.2.5-r1 apk
ncurses-terminfo-base 6.4_p20240420-r0 apk
netcat-openbsd 1.226-r0 apk
nghttp2-libs 1.62.1-r0 apk
oniguruma 6.9.9-r0 apk
procps-ng 4.0.4-r0 apk
pyc 3.12.3-r1 apk
python3 3.12.3-r1 apk
python3-pyc 3.12.3-r1 apk
python3-pycache-pyc0 3.12.3-r1 apk
readline 8.2.10-r0 apk
scanelf 1.3.7-r2 apk
shadow 4.13-r6 apk
skalibs 2.13.1.1-r2 apk
sqlite-libs 3.42.0-r2 apk
ssl_client 1.36.1-r1 apk
transmission-cli 4.0.3-r3 apk
transmission-daemon 4.0.3-r3 apk
transmission-extra 4.0.3-r3 apk
transmission-remote 4.0.3-r3 apk
tzdata 2023c-r1 apk
utmps-libs 0.1.2.1-r2 apk
xz-libs 5.4.3-r1 apk
zlib 1.2.13-r2 apk
shadow 4.15.1-r0 apk
skalibs 2.14.2.0-r0 apk
sqlite-libs 3.46.0-r0 apk
ssl_client 1.36.1-r31 apk
transmission-cli 4.0.5-r3 apk
transmission-daemon 4.0.5-r3 apk
transmission-extra 4.0.5-r3 apk
transmission-remote 4.0.5-r3 apk
tzdata 2024a-r1 apk
utmps-libs 0.1.2.2-r1 apk
xz-libs 5.6.2-r0 apk
zlib 1.3.1-r1 apk
zstd-libs 1.5.6-r0 apk

View File

@@ -80,6 +80,8 @@ app_setup_block: |
# changelog
changelogs:
- { date: "07.10.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."}
- { date: "10.08.23:", desc: "Bump unrar to 6.2.10."}
- { date: "10.06.23:", desc: "Bump unrar to 6.2.8, install transmission-extra." }
- { date: "25.05.23:", desc: "Deprecate armhf." }
- { date: "14.05.23:", desc: "Explicitly install transmission-remote." }

2
root/etc/crontabs/abc Normal file
View File

@@ -0,0 +1,2 @@
# min hour day month weekday command
0 3 * * * /app/blocklist-update.sh 2>&1

View File

@@ -1,10 +0,0 @@
# do daily/weekly/monthly maintenance
# min hour day month weekday command
*/15 * * * * run-parts /etc/periodic/15min
0 * * * * run-parts /etc/periodic/hourly
0 2 * * * run-parts /etc/periodic/daily
0 3 * * 6 run-parts /etc/periodic/weekly
0 5 1 * * run-parts /etc/periodic/monthly
# run daily blocklist update
0 3 * * * /app/blocklist-update.sh 2>&1

View File

@@ -1,22 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# make folders
mkdir -p \
/config/crontabs
## root
# if crontabs do not exist in config
if [[ ! -f /config/crontabs/root ]]; then
# copy crontab from system
if crontab -l -u root; then
crontab -l -u root >/config/crontabs/root
fi
# if crontabs still do not exist in config (were not copied from system)
# copy crontab from included defaults (using -n, do not overwrite an existing file)
cp -n /etc/crontabs/root /config/crontabs/
fi
# set permissions and import user crontabs
lsiown root:root /config/crontabs/root
crontab -u root /config/crontabs/root

View File

@@ -1 +0,0 @@
oneshot

View File

@@ -1 +0,0 @@
/etc/s6-overlay/s6-rc.d/init-crontabs-config/run

View File

@@ -1,4 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec /usr/sbin/crond -f -S -l 5

View File

@@ -1 +0,0 @@
longrun