From 6f623f7e2b5dc2b0379e9c1ed04b9172312c207d Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 29 Apr 2026 20:52:28 +0000 Subject: [PATCH] Switch upstream to codeberg, add sponsor links --- .github/FUNDING.yml | 1 + .github/workflows/external_trigger.yml | 4 +-- Dockerfile | 6 ++-- Dockerfile.aarch64 | 6 ++-- Jenkinsfile | 40 ++++++++++---------------- README.md | 5 ++-- jenkins-vars.yml | 8 +++--- readme-vars.yml | 3 +- root/donate.txt | 1 + 9 files changed, 34 insertions(+), 40 deletions(-) create mode 100644 root/donate.txt diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 7eaac77..0e18699 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ github: linuxserver open_collective: linuxserver +custom: ["https://www.bookstackapp.com/donate/",] diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index ac0689e..cbf9361 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -29,8 +29,8 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of master branch. To disable this trigger, add \`bookstack_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $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/bookstackapp/bookstack/releases/latest" | jq -r '. | .tag_name') - echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY + EXT_RELEASE=$(curl -sX GET 'https://codeberg.org/api/v1/repos/bookstack/bookstack/releases/latest' | jq -r '.tag_name') + echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY if grep -q "^bookstack_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY diff --git a/Dockerfile b/Dockerfile index cb6ca0a..981f51a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,12 +35,12 @@ RUN \ mkdir -p\ /app/www && \ if [ -z ${BOOKSTACK_RELEASE+x} ]; then \ - BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + BOOKSTACK_RELEASE=$(curl -sX GET "https://codeberg.org/api/v1/repos/bookstack/bookstack/releases/latest" \ + | jq -r '.tag_name'); \ fi && \ curl -o \ /tmp/bookstack.tar.gz -L \ - "https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \ + "https://codeberg.org/bookstack/bookstack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \ tar xf \ /tmp/bookstack.tar.gz -C \ /app/www/ --strip-components=1 && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 08cffde..27d1897 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -35,12 +35,12 @@ RUN \ mkdir -p\ /app/www && \ if [ -z ${BOOKSTACK_RELEASE+x} ]; then \ - BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + BOOKSTACK_RELEASE=$(curl -sX GET "https://codeberg.org/api/v1/repos/bookstack/bookstack/releases/latest" \ + | jq -r '.tag_name'); \ fi && \ curl -o \ /tmp/bookstack.tar.gz -L \ - "https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \ + "https://codeberg.org/bookstack/bookstack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \ tar xf \ /tmp/bookstack.tar.gz -C \ /app/www/ --strip-components=1 && \ diff --git a/Jenkinsfile b/Jenkinsfile index 7635b07..2f04ac2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,9 +19,6 @@ pipeline { DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat') QUAYIO_API_TOKEN=credentials('quayio-repo-api-token') GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f') - EXT_GIT_BRANCH = 'master' - EXT_USER = 'bookstackapp' - EXT_REPO = 'bookstack' BUILD_VERSION_ARG = 'BOOKSTACK_RELEASE' LS_USER = 'linuxserver' LS_REPO = 'docker-bookstack' @@ -97,7 +94,7 @@ pipeline { env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.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' + 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 ./root/donate.txt' if ( env.SYFT_IMAGE_TAG == null ) { env.SYFT_IMAGE_TAG = 'latest' } @@ -146,23 +143,16 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is a stable github release use the latest endpoint from github to determine the ext tag - stage("Set ENV github_stable"){ - steps{ - script{ - env.EXT_RELEASE = sh( - script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', - returnStdout: true).trim() - } - } - } - // If this is a stable or devel github release generate the link for the build message - stage("Set ENV github_link"){ - steps{ - script{ - env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE - } - } + // If this is a custom command to determine version use that command + stage("Set tag custom bash"){ + steps{ + script{ + env.EXT_RELEASE = sh( + script: ''' curl -sX GET 'https://codeberg.org/api/v1/repos/bookstack/bookstack/releases/latest' | jq -r '.tag_name' ''', + returnStdout: true).trim() + env.RELEASE_LINK = 'custom_command' + } + } } // Sanitize the release tag and strip illegal docker or github characters stage("Sanitize tag"){ @@ -603,7 +593,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Bookstack\" \ - --label \"org.opencontainers.image.description=[Bookstack](https://github.com/BookStackApp/BookStack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com \" \ + --label \"org.opencontainers.image.description=[Bookstack](https://codeberg.org/bookstack/bookstack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com \" \ --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -672,7 +662,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Bookstack\" \ - --label \"org.opencontainers.image.description=[Bookstack](https://github.com/BookStackApp/BookStack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com \" \ + --label \"org.opencontainers.image.description=[Bookstack](https://codeberg.org/bookstack/bookstack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com \" \ --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -734,7 +724,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Bookstack\" \ - --label \"org.opencontainers.image.description=[Bookstack](https://github.com/BookStackApp/BookStack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com \" \ + --label \"org.opencontainers.image.description=[Bookstack](https://codeberg.org/bookstack/bookstack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com \" \ --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -1032,7 +1022,7 @@ pipeline { "type": "commit",\ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' echo "Pushing New release for Tag" - curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. |.body' > releasebody.json + echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json jq -n \ --arg tag_name "$META_TAG" \ --arg target_commitish "master" \ diff --git a/README.md b/README.md index eca2338..470eae0 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ Find us at: [![Docker Stars](https://img.shields.io/docker/stars/linuxserver/bookstack.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/bookstack) [![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-bookstack%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-bookstack/job/master/) -[Bookstack](https://github.com/BookStackApp/BookStack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. +[Bookstack](https://codeberg.org/bookstack/bookstack) is a free and open source Wiki designed for creating beautiful documentation. Featuring a simple, but powerful WYSIWYG editor it allows for teams to create detailed and useful documentation with ease. Powered by SQL and including a Markdown editor for those who prefer it, BookStack is geared towards making documentation more of a pleasure than a chore. For more information on BookStack visit their website and check it out: https://www.bookstackapp.com -[![bookstack](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/bookstack-logo.png)](https://github.com/BookStackApp/BookStack) +[![bookstack](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/bookstack-logo.png)](https://codeberg.org/bookstack/bookstack) ## Supported Architectures @@ -343,6 +343,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **29.04.26:** - Switch to pulling release from [Codeberg](https://codeberg.org/bookstack/bookstack). * **28.12.25:** - Rebase to Alpine 3.23. * **05.07.25:** - Rebase to Alpine 3.22. * **04.01.25:** - Add php-opcache. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 11a6cda..b2577c3 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,14 +2,12 @@ # jenkins variables project_name: docker-bookstack -external_type: github_stable +external_type: na +custom_version_command: "curl -sX GET 'https://codeberg.org/api/v1/repos/bookstack/bookstack/releases/latest' | jq -r '.tag_name'" release_type: stable release_tag: latest ls_branch: master repo_vars: - - EXT_GIT_BRANCH = 'master' - - EXT_USER = 'bookstackapp' - - EXT_REPO = 'bookstack' - BUILD_VERSION_ARG = 'BOOKSTACK_RELEASE' - LS_USER = 'linuxserver' - LS_REPO = 'docker-bookstack' @@ -27,3 +25,5 @@ repo_vars: - CI_DOCKERENV='' - CI_AUTH = '' - CI_WEBPATH = '' +sponsor_links: + - { name: "Bookstack", url: "https://www.bookstackapp.com/donate/" } diff --git a/readme-vars.yml b/readme-vars.yml index bc1c8c3..483f102 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -2,7 +2,7 @@ # project information project_name: bookstack -project_url: "https://github.com/BookStackApp/BookStack" +project_url: "https://codeberg.org/bookstack/bookstack" project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/bookstack-logo.png" project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" project_categories: "Content Management" @@ -136,6 +136,7 @@ init_diagram: | "bookstack:latest" <- Base Images # changelog changelogs: + - {date: "29.04.26:", desc: "Switch to pulling releases from [Codeberg](https://codeberg.org/bookstack/bookstack)."} - {date: "28.12.25:", desc: "Rebase to Alpine 3.23."} - {date: "05.07.25:", desc: "Rebase to Alpine 3.22."} - {date: "04.01.25:", desc: "Add php-opcache."} diff --git a/root/donate.txt b/root/donate.txt new file mode 100644 index 0000000..acfd5a5 --- /dev/null +++ b/root/donate.txt @@ -0,0 +1 @@ +Bookstack: https://www.bookstackapp.com/donate/