mirror of
https://github.com/linuxserver/docker-nextcloud.git
synced 2026-06-03 09:57:35 +00:00
Compare commits
255 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a5f9d2b05 | |||
| 271f2d8937 | |||
| 5245b16b81 | |||
| 81aec3f457 | |||
| 68a9ef6d60 | |||
| 2b72530f8f | |||
| b37cc80fe0 | |||
| 90ae0699f7 | |||
| c55960faad | |||
| 3e9639bc9c | |||
| e49698776a | |||
| a988e18597 | |||
| d765d296e7 | |||
| 2b10bdeab4 | |||
| 71679df706 | |||
| 3d8e8ffd92 | |||
| 6bee23fa13 | |||
| 61c22a7270 | |||
| 8c560d9e81 | |||
| c7ba8dd567 | |||
| 349f723241 | |||
| a1c5a02841 | |||
| 41a1c80112 | |||
| c3811ffcd0 | |||
| 43464eac91 | |||
| b5e1ea428f | |||
| dd0693c9e2 | |||
| ed8c5b0703 | |||
| c2057ca1ed | |||
| 00b7ea5cb3 | |||
| 0ec959e8c7 | |||
| 6159545435 | |||
| df969acaaf | |||
| 08b3153c6c | |||
| e2f5a4881d | |||
| f46689ba0a | |||
| 0725c68408 | |||
| 1fb67f3cf0 | |||
| 2f2f584fb0 | |||
| 1247a815de | |||
| 8c6dafe518 | |||
| af856445db | |||
| 103f1d67c6 | |||
| b621b67f26 | |||
| 38d52211e9 | |||
| 6a2d868229 | |||
| ea707b9e5d | |||
| 5450bab38a | |||
| a9aaf78b30 | |||
| 716d6dbb2e | |||
| 930e6bb596 | |||
| d0b76f5482 | |||
| db360ca162 | |||
| 98da436987 | |||
| 76ab834a20 | |||
| b46c42cacf | |||
| ce900d8d8e | |||
| 8bdbbf982e | |||
| dec81a2751 | |||
| 1fde72fae4 | |||
| 21f0bce059 | |||
| 83d8ac703d | |||
| 7b5a4358b7 | |||
| e04f41c4a3 | |||
| fc3e3d2724 | |||
| a208935571 | |||
| 9e202081d7 | |||
| 2d602b0e46 | |||
| 8c1048c348 | |||
| 5bf22d2a8c | |||
| d05e5a7904 | |||
| 4ff83c7210 | |||
| d2ca43078a | |||
| 523b71f45c | |||
| 0f41399c9f | |||
| 72192aeb47 | |||
| fecf7673d6 | |||
| a39017cc73 | |||
| 2e2b3b9cf6 | |||
| e17cb4a648 | |||
| 1cbdb9f4e7 | |||
| 9d83dc0ece | |||
| 3abdcce7b0 | |||
| 05bafbb7b1 | |||
| 08449338b2 | |||
| 1cf1a7f450 | |||
| bfbe03b675 | |||
| 32117124ec | |||
| f10a2c5ebb | |||
| 65336aae28 | |||
| 5d472c622c | |||
| 33c48f4405 | |||
| 7ef7a7025d | |||
| e4058b48df | |||
| dbe6f269c5 | |||
| 5eeca64e8e | |||
| 8c3a38e0be | |||
| bd23955995 | |||
| fb7d5ec411 | |||
| 7aa8d56075 | |||
| 55012a2508 | |||
| f2aeaf922e | |||
| 87797a998c | |||
| 7251f37675 | |||
| e2cf4b7e1b | |||
| 6bd06be5b2 | |||
| 0dba137a29 | |||
| e150ec8200 | |||
| a6f3b90552 | |||
| ce8f20b1a0 | |||
| 1ed02051f3 | |||
| 8de888ed1e | |||
| 52caabe6e1 | |||
| abcb894240 | |||
| 70c4bd63f1 | |||
| a101ff6d14 | |||
| fbdf2b2eb3 | |||
| e3250f0107 | |||
| ed224e0523 | |||
| fa1225fd22 | |||
| 7e34d51683 | |||
| f1fb49429c | |||
| 9d9e6ac736 | |||
| 9c35ccc9c3 | |||
| 7c83ac3ae8 | |||
| ec446daf59 | |||
| ee0f0ba1da | |||
| 14ed393810 | |||
| 7bf3ea8641 | |||
| da6033ad1a | |||
| c7d16fd78d | |||
| b09792001d | |||
| dafdd3d0ef | |||
| 0fec1e2d1f | |||
| a1efdbff95 | |||
| 1b21aa9752 | |||
| 82d3ce42f5 | |||
| 1c717ed2d3 | |||
| a9b4b64147 | |||
| 1f8d395d78 | |||
| d520caca1d | |||
| 02d627ff88 | |||
| 035711f3e7 | |||
| f72ad27864 | |||
| 0281fd2f76 | |||
| 2273a0b3fc | |||
| 923c3301ae | |||
| afc2c65ba0 | |||
| 1bdc3ce934 | |||
| 4c43010214 | |||
| 6d784f8cc4 | |||
| d8d98c708c | |||
| 1b5d3ee8f8 | |||
| 195ba6d634 | |||
| 5e54e9ed78 | |||
| c9de3ee13f | |||
| 5905985884 | |||
| 80a6a72a2e | |||
| 94059f4f8c | |||
| f3a23468b8 | |||
| 17e9b76ae2 | |||
| 69c818dfe9 | |||
| 8f491be450 | |||
| 1976901a43 | |||
| 12d3825554 | |||
| aec8824238 | |||
| 86795c1bd5 | |||
| 92dd23b49b | |||
| 1dbeb4a006 | |||
| 6785c9836e | |||
| 2313c84a2f | |||
| f390f10da9 | |||
| 12ac2da8ea | |||
| a7c3e50f35 | |||
| 831ce18af1 | |||
| 787055f100 | |||
| a5387e7e93 | |||
| a433a93be4 | |||
| 2fe4e7f4dd | |||
| c5113c09c3 | |||
| 975e20b305 | |||
| a9a42c6dd3 | |||
| e610ba336a | |||
| c132755dc2 | |||
| 9e19c87fb6 | |||
| 195b4b9f84 | |||
| 3df9fb301a | |||
| 643222817f | |||
| cd1f5c8f3e | |||
| 2d4551b309 | |||
| 360dce038d | |||
| ca6cd4b47e | |||
| 4030be8278 | |||
| 6b9d8e456a | |||
| 760894a4fb | |||
| 2d7a5594b7 | |||
| 8cff1cf999 | |||
| 883ffed0d8 | |||
| 6a22255425 | |||
| 4e037eca94 | |||
| 210ce02e22 | |||
| 144d576909 | |||
| 9895069283 | |||
| ca1ef7f8aa | |||
| 1dc7711ecb | |||
| 35de5f814c | |||
| 9f23faeab3 | |||
| 22f9e84444 | |||
| 1b0600d3cc | |||
| 20c6337958 | |||
| 07a04516b1 | |||
| 5abf9b3d36 | |||
| 1a559c9893 | |||
| fa511a6f7b | |||
| ceb60ef76b | |||
| ba7913a764 | |||
| d3698ce2e6 | |||
| c2d8366bfb | |||
| 052617f0b8 | |||
| fa870cb93c | |||
| 47204a2368 | |||
| 11aedff334 | |||
| 04b088162e | |||
| 41ed12bc46 | |||
| 9e8419179c | |||
| 56206810af | |||
| 0794dc7b87 | |||
| 7e18efc6d5 | |||
| 4636a2ef5f | |||
| bb421a0d33 | |||
| fd22973a29 | |||
| 186e5194f5 | |||
| 7e18f6f27d | |||
| b7d9f30b0d | |||
| 64922d3839 | |||
| 05e5c8363a | |||
| 2ecd6cb8d9 | |||
| 1cce29259a | |||
| 8e3018012d | |||
| 12810033bf | |||
| 5f37ac0862 | |||
| b92694d865 | |||
| 6f2ac537d5 | |||
| 3accfcac32 | |||
| c93fe11b13 | |||
| 330bf2caca | |||
| 9ac9165b38 | |||
| a116d0836b | |||
| 2e9769050c | |||
| 76d3af10c2 | |||
| 87ab71daba | |||
| 8263ebe714 | |||
| 61cacaaa92 | |||
| 1585ba556b | |||
| 8e868b8471 |
@@ -24,7 +24,7 @@
|
||||
## Readme
|
||||
|
||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-nextcloud/edit/develop/readme-vars.yml).
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-nextcloud/edit/previous/readme-vars.yml).
|
||||
|
||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-nextcloud)
|
||||
@@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Update the changelog
|
||||
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-nextcloud/tree/develop/root), add an entry to the changelog
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-nextcloud/tree/previous/root), add an entry to the changelog
|
||||
|
||||
```yml
|
||||
changelogs:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
------------------------------
|
||||
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-nextcloud/blob/develop/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-nextcloud/blob/previous/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
|
||||
------------------------------
|
||||
|
||||
|
||||
@@ -7,31 +7,31 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
external-trigger-develop:
|
||||
external-trigger-previous:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/develop'
|
||||
if: github.ref == 'refs/heads/previous'
|
||||
env:
|
||||
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
|
||||
run: |
|
||||
printf "# External trigger for docker-nextcloud\n\n" >> $GITHUB_STEP_SUMMARY
|
||||
if grep -q "^nextcloud_develop_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
if grep -q "^nextcloud_previous_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`nextcloud_develop_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
|
||||
elif grep -q "^nextcloud_develop" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`nextcloud_previous_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY
|
||||
elif grep -q "^nextcloud_previous" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`nextcloud_develop\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`nextcloud_previous\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
fi
|
||||
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> External trigger running off of develop branch. To disable this trigger, add \`nextcloud_develop\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
|
||||
echo "> External trigger running off of previous branch. To disable this trigger, add \`nextcloud_previous\` 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/nextcloud/server/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | sed 's|^v||g' | sort -rV | head -1)
|
||||
EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r "first(.[] | select(.tag_name | contains($(( $(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r '.[] | select(.prerelease != true) | .tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}' | sort -rV | head -1) -1 ))|tostring ) and (contains( \"rc\" )|not)) | .tag_name)" | sed 's|^v||g')
|
||||
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
|
||||
if grep -q "^nextcloud_develop_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
|
||||
if grep -q "^nextcloud_previous_${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
|
||||
exit 0
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="Can't retrieve external version for nextcloud branch develop"
|
||||
FAILURE_REASON="Can't retrieve external version for nextcloud branch previous"
|
||||
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-nextcloud/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,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
|
||||
image="linuxserver/nextcloud"
|
||||
tag="develop"
|
||||
tag="previous"
|
||||
token=$(curl -sX GET \
|
||||
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fnextcloud%3Apull" \
|
||||
| jq -r '.token')
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
if [ -z "${IMAGE_VERSION}" ]; then
|
||||
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 nextcloud tag develop"
|
||||
FAILURE_REASON="Can't retrieve last pushed version for nextcloud tag previous"
|
||||
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 }}
|
||||
@@ -106,14 +106,14 @@ jobs:
|
||||
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
|
||||
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nextcloud/job/develop/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nextcloud/job/previous/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" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
else
|
||||
if [[ "${artifacts_found}" == "false" ]]; then
|
||||
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
|
||||
echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY
|
||||
FAILURE_REASON="New version ${EXT_RELEASE} for nextcloud tag develop is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
||||
FAILURE_REASON="New version ${EXT_RELEASE} for nextcloud tag previous is detected, however not all artifacts are uploaded to upstream release yet. Will try again later."
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nextcloud/job/develop/buildWithParameters?PACKAGE_CHECK=false \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nextcloud/job/previous/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'})" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY
|
||||
@@ -139,7 +139,7 @@ jobs:
|
||||
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
--data-urlencode "Submit=Submit"
|
||||
echo "**** Notifying Discord ****"
|
||||
TRIGGER_REASON="A version change was detected for nextcloud tag develop. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
|
||||
TRIGGER_REASON="A version change was detected for nextcloud tag previous. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
|
||||
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
|
||||
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
|
||||
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
@@ -15,5 +15,5 @@ jobs:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-nextcloud/blob/develop/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-nextcloud/blob/previous/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+8
-3
@@ -18,6 +18,9 @@ RUN \
|
||||
ffmpeg \
|
||||
gnu-libiconv \
|
||||
imagemagick \
|
||||
imagemagick-heic \
|
||||
imagemagick-pdf \
|
||||
imagemagick-svg \
|
||||
libxml2 \
|
||||
php84-apcu \
|
||||
php84-bcmath \
|
||||
@@ -47,6 +50,7 @@ RUN \
|
||||
php84-xmlreader \
|
||||
rsync \
|
||||
samba-client \
|
||||
util-linux \
|
||||
sudo && \
|
||||
echo "**** configure php-fpm to pass env vars ****" && \
|
||||
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php84/php-fpm.d/www.conf && \
|
||||
@@ -80,12 +84,13 @@ RUN \
|
||||
/app/www/src/ && \
|
||||
if [ -z ${NEXTCLOUD_RELEASE+x} ]; then \
|
||||
NEXTCLOUD_RELEASE=$(curl -sX GET https://api.github.com/repos/nextcloud/server/releases \
|
||||
| jq -r '.[] | select(.prerelease == true) | .tag_name' \
|
||||
| sed 's|^v||g' | sort -rV | head -1); \
|
||||
| jq -r "first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases/latest \
|
||||
| jq -r '.tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}') -1 ))|tostring ) and (contains( \"rc\" )|not)) | .tag_name)" \
|
||||
| sed 's|^v||g'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/nextcloud.tar.bz2 -L \
|
||||
https://download.nextcloud.com/server/prereleases/nextcloud-${NEXTCLOUD_RELEASE}.tar.bz2 && \
|
||||
https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_RELEASE}.tar.bz2 && \
|
||||
tar xf /tmp/nextcloud.tar.bz2 -C \
|
||||
/app/www/src --strip-components=1 && \
|
||||
rm -rf /app/www/src/updater && \
|
||||
|
||||
+8
-3
@@ -18,6 +18,9 @@ RUN \
|
||||
ffmpeg \
|
||||
gnu-libiconv \
|
||||
imagemagick \
|
||||
imagemagick-heic \
|
||||
imagemagick-pdf \
|
||||
imagemagick-svg \
|
||||
libxml2 \
|
||||
php84-apcu \
|
||||
php84-bcmath \
|
||||
@@ -47,6 +50,7 @@ RUN \
|
||||
php84-xmlreader \
|
||||
rsync \
|
||||
samba-client \
|
||||
util-linux \
|
||||
sudo && \
|
||||
echo "**** configure php-fpm to pass env vars ****" && \
|
||||
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php84/php-fpm.d/www.conf && \
|
||||
@@ -80,12 +84,13 @@ RUN \
|
||||
/app/www/src/ && \
|
||||
if [ -z ${NEXTCLOUD_RELEASE+x} ]; then \
|
||||
NEXTCLOUD_RELEASE=$(curl -sX GET https://api.github.com/repos/nextcloud/server/releases \
|
||||
| jq -r '.[] | select(.prerelease == true) | .tag_name' \
|
||||
| sed 's|^v||g' | sort -rV | head -1); \
|
||||
| jq -r "first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases/latest \
|
||||
| jq -r '.tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}') -1 ))|tostring ) and (contains( \"rc\" )|not)) | .tag_name)" \
|
||||
| sed 's|^v||g'); \
|
||||
fi && \
|
||||
curl -o \
|
||||
/tmp/nextcloud.tar.bz2 -L \
|
||||
https://download.nextcloud.com/server/prereleases/nextcloud-${NEXTCLOUD_RELEASE}.tar.bz2 && \
|
||||
https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_RELEASE}.tar.bz2 && \
|
||||
tar xf /tmp/nextcloud.tar.bz2 -C \
|
||||
/app/www/src --strip-components=1 && \
|
||||
rm -rf /app/www/src/updater && \
|
||||
|
||||
Vendored
+146
-162
@@ -75,10 +75,8 @@ pipeline {
|
||||
'''
|
||||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.CI_TEST_ATTEMPTED = ''
|
||||
env.PUSH_ATTEMPTED = ''
|
||||
env.LS_RELEASE = sh(
|
||||
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:develop 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:previous 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
returnStdout: true).trim()
|
||||
env.LS_RELEASE_NOTES = sh(
|
||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||
@@ -111,7 +109,7 @@ pipeline {
|
||||
script{
|
||||
env.LS_TAG_NUMBER = sh(
|
||||
script: '''#! /bin/bash
|
||||
tagsha=$(git rev-list -n 1 develop-${LS_RELEASE} 2>/dev/null)
|
||||
tagsha=$(git rev-list -n 1 previous-${LS_RELEASE} 2>/dev/null)
|
||||
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
|
||||
echo ${LS_RELEASE_NUMBER}
|
||||
elif [ -z "${GIT_COMMIT}" ]; then
|
||||
@@ -149,7 +147,7 @@ pipeline {
|
||||
steps{
|
||||
script{
|
||||
env.EXT_RELEASE = sh(
|
||||
script: ''' curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | sed 's|^v||g' | sort -rV | head -1 ''',
|
||||
script: ''' curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r "first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r '.[] | select(.prerelease != true) | .tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}' | sort -rV | head -1) -1 ))|tostring ) and (contains( \\"rc\\" )|not)) | .tag_name)" | sed 's|^v||g' ''',
|
||||
returnStdout: true).trim()
|
||||
env.RELEASE_LINK = 'custom_command'
|
||||
}
|
||||
@@ -189,10 +187,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a develop build use live docker endpoints
|
||||
// If this is a previous build use live docker endpoints
|
||||
stage("Set ENV live build"){
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@@ -202,13 +200,13 @@ pipeline {
|
||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.CI_TAGS = 'amd64-previous-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-previous-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
} else {
|
||||
env.CI_TAGS = 'develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.CI_TAGS = 'previous-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.META_TAG = 'develop-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = 'develop-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'previous-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = 'previous-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
env.CITEST_IMAGETAG = 'latest'
|
||||
}
|
||||
@@ -217,7 +215,7 @@ pipeline {
|
||||
// If this is a dev build use dev docker endpoints
|
||||
stage("Set ENV dev build"){
|
||||
when {
|
||||
not {branch "develop"}
|
||||
not {branch "previous"}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
@@ -227,13 +225,13 @@ pipeline {
|
||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.CI_TAGS = 'amd64-previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
} else {
|
||||
env.CI_TAGS = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.CI_TAGS = 'previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.META_TAG = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = 'develop-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = 'previous-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
env.CITEST_IMAGETAG = 'develop'
|
||||
@@ -252,13 +250,13 @@ pipeline {
|
||||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
env.CI_TAGS = 'amd64-previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
} else {
|
||||
env.CI_TAGS = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
env.CI_TAGS = 'previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
env.META_TAG = 'develop-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
env.EXT_RELEASE_TAG = 'develop-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'previous-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST
|
||||
env.EXT_RELEASE_TAG = 'previous-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||
env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache'
|
||||
@@ -285,7 +283,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.23 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||
ghcr.io/linuxserver/baseimage-alpine:3 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 && \
|
||||
@@ -297,7 +295,7 @@ pipeline {
|
||||
// Use helper containers to render templated files
|
||||
stage('Update-Templates') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
expression {
|
||||
env.CONTAINER_NAME != null
|
||||
@@ -309,24 +307,24 @@ pipeline {
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||
# Cloned repo paths for templating:
|
||||
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch develop of ${LS_USER}/${LS_REPO} for running the jenkins builder on
|
||||
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch develop of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github
|
||||
# ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch previous of ${LS_USER}/${LS_REPO} for running the jenkins builder on
|
||||
# ${TEMPDIR}/repo/${LS_REPO}: Cloned branch previous 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 develop --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
git clone --branch previous --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}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f develop
|
||||
git checkout -f previous
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||
git add Jenkinsfile
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
@@ -345,13 +343,13 @@ pipeline {
|
||||
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 develop
|
||||
git checkout -f previous
|
||||
for i in ${TEMPLATES_TO_DELETE}; do
|
||||
git rm "${i}"
|
||||
done
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
@@ -366,20 +364,20 @@ pipeline {
|
||||
sed -i 's|^changelogs:|# init diagram\\ninit_diagram:\\n\\n# changelog\\nchangelogs:|' readme-vars.yml
|
||||
fi
|
||||
mkdir -p ${TEMPDIR}/d2
|
||||
docker run --rm -v ${TEMPDIR}/d2:/output -e PUID=$(id -u) -e PGID=$(id -g) -e RAW="true" ghcr.io/linuxserver/d2-builder:latest ${CONTAINER_NAME}:develop
|
||||
docker run --rm -v ${TEMPDIR}/d2:/output -e PUID=$(id -u) -e PGID=$(id -g) -e RAW="true" ghcr.io/linuxserver/d2-builder:latest ${CONTAINER_NAME}:previous
|
||||
ls -al ${TEMPDIR}/d2
|
||||
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-develop.d2\\")" readme-vars.yml
|
||||
yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-previous.d2\\")" readme-vars.yml
|
||||
if [[ $(md5sum readme-vars.yml | cut -c1-8) != $(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/readme-vars.yml | cut -c1-8) ]]; then
|
||||
echo "'init_diagram' has been updated. Updating repo and exiting build, new one will trigger based on commit."
|
||||
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 develop
|
||||
git checkout -f previous
|
||||
cp ${WORKSPACE}/readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/readme-vars.yml
|
||||
git add readme-vars.yml
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating templates and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
@@ -396,7 +394,7 @@ pipeline {
|
||||
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 develop
|
||||
git checkout -f previous
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||
@@ -409,8 +407,8 @@ pipeline {
|
||||
fi
|
||||
git add readme-vars.yml ${TEMPLATED_FILES}
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Updating templates and exiting build, new one will trigger based on commit"
|
||||
rm -Rf ${TEMPDIR}
|
||||
@@ -511,7 +509,7 @@ pipeline {
|
||||
// Exit the build if the Templated files were just updated
|
||||
stage('Template-exit') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'FILES_UPDATED', value: 'true'
|
||||
expression {
|
||||
@@ -524,10 +522,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a develop build check the S6 service file perms
|
||||
// If this is a previous build check the S6 service file perms
|
||||
stage("Check S6 Service file Permissions"){
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
@@ -780,7 +778,7 @@ pipeline {
|
||||
// Take the image we just built and dump package versions for comparison
|
||||
stage('Update-packages') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
@@ -803,14 +801,14 @@ pipeline {
|
||||
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f develop
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f previous
|
||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||
cd ${TEMPDIR}/${LS_REPO}/
|
||||
wait
|
||||
git add package_versions.txt
|
||||
git commit -m 'Bot Updating Package Versions'
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git develop
|
||||
git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git previous
|
||||
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Package tag updated, stopping build process"
|
||||
else
|
||||
@@ -828,7 +826,7 @@ pipeline {
|
||||
// Exit the build if the package file was just updated
|
||||
stage('PACKAGE-exit') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
@@ -842,7 +840,7 @@ pipeline {
|
||||
// Exit the build if this is just a package check and there are no changes to push
|
||||
stage('PACKAGECHECK-exit') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
@@ -873,7 +871,6 @@ pipeline {
|
||||
script{
|
||||
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
|
||||
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
|
||||
env.CI_TEST_ATTEMPTED = 'true'
|
||||
}
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
@@ -897,7 +894,7 @@ pipeline {
|
||||
-e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \
|
||||
-e TAGS=\"${CI_TAGS}\" \
|
||||
-e META_TAG=\"${META_TAG}\" \
|
||||
-e RELEASE_TAG=\"develop\" \
|
||||
-e RELEASE_TAG=\"previous\" \
|
||||
-e PORT=\"${CI_PORT}\" \
|
||||
-e SSL=\"${CI_SSL}\" \
|
||||
-e BASE=\"${DIST_IMAGE}\" \
|
||||
@@ -926,9 +923,6 @@ pipeline {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
env.PUSH_ATTEMPTED = 'true'
|
||||
}
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
@@ -940,7 +934,7 @@ pipeline {
|
||||
CACHEIMAGE=${i}
|
||||
fi
|
||||
done
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:develop -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:previous -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
@@ -958,27 +952,20 @@ pipeline {
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
script{
|
||||
env.PUSH_ATTEMPTED = 'true'
|
||||
}
|
||||
retry_backoff(5,5) {
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
if [[ "${MANIFESTIMAGE%%/*}" =~ \\. ]]; then
|
||||
MANIFESTIMAGEPLUS="${MANIFESTIMAGE}"
|
||||
else
|
||||
MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}"
|
||||
fi
|
||||
[[ ${MANIFESTIMAGE%%/*} =~ \\. ]] && MANIFESTIMAGEPLUS="${MANIFESTIMAGE}" || MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}"
|
||||
IFS=',' read -ra CACHE <<< "$BUILDCACHE"
|
||||
for i in "${CACHE[@]}"; do
|
||||
if [[ "${MANIFESTIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then
|
||||
CACHEIMAGE=${i}
|
||||
fi
|
||||
done
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-develop -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-previous -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-develop -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-previous -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \
|
||||
@@ -988,7 +975,7 @@ pipeline {
|
||||
fi
|
||||
done
|
||||
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:develop ${MANIFESTIMAGE}:amd64-develop ${MANIFESTIMAGE}:arm64v8-develop || \
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:previous ${MANIFESTIMAGE}:amd64-previous ${MANIFESTIMAGE}:arm64v8-previous || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} || \
|
||||
{ if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" ]]; then exit 1; fi; }
|
||||
@@ -1006,7 +993,7 @@ pipeline {
|
||||
// If this is a public release tag it in the LS Github
|
||||
stage('Github-Tag-Push-Release') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
@@ -1022,21 +1009,21 @@ pipeline {
|
||||
else
|
||||
AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \
|
||||
-d '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "develop"}' \
|
||||
"target_commitish": "previous"}' \
|
||||
| jq -r '.body' | sed 's|## What.s Changed||')
|
||||
fi
|
||||
echo "Pushing New tag for current commit ${META_TAG}"
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${META_TAG}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to develop",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to previous",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}'
|
||||
echo "Pushing New release for Tag"
|
||||
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
|
||||
jq -n \
|
||||
--arg tag_name "$META_TAG" \
|
||||
--arg target_commitish "develop" \
|
||||
--arg target_commitish "previous" \
|
||||
--arg ci_url "${CI_URL:-N/A}" \
|
||||
--arg ls_notes "$AUTO_RELEASE_NOTES" \
|
||||
--arg remote_notes "$(cat releasebody.json)" \
|
||||
@@ -1054,14 +1041,14 @@ pipeline {
|
||||
// Add protection to the release branch
|
||||
stage('Github-Release-Branch-Protection') {
|
||||
when {
|
||||
branch "develop"
|
||||
branch "previous"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
echo "Setting up protection for release branch develop"
|
||||
echo "Setting up protection for release branch previous"
|
||||
sh '''#! /bin/bash
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/develop/protection \
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/previous/protection \
|
||||
-d $(jq -c . << EOF
|
||||
{
|
||||
"required_status_checks": null,
|
||||
@@ -1086,13 +1073,98 @@ EOF
|
||||
) '''
|
||||
}
|
||||
}
|
||||
// If this is a Pull request send the CI link as a comment on it
|
||||
stage('Pull Request Comment') {
|
||||
when {
|
||||
not {environment name: 'CHANGE_ID', value: ''}
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps {
|
||||
sh '''#! /bin/bash
|
||||
# Function to retrieve JSON data from URL
|
||||
get_json() {
|
||||
local url="$1"
|
||||
local response=$(curl -s "$url")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to retrieve JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
local json=$(echo "$response" | jq .)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to parse JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
echo "$json"
|
||||
}
|
||||
|
||||
build_table() {
|
||||
local data="$1"
|
||||
|
||||
# Get the keys in the JSON data
|
||||
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
|
||||
|
||||
# Check if keys are empty
|
||||
if [ -z "$keys" ]; then
|
||||
echo "JSON report data does not contain any keys or the report does not exist."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Build table header
|
||||
local header="| Tag | Passed |\\n| --- | --- |\\n"
|
||||
|
||||
# Loop through the JSON data to build the table rows
|
||||
local rows=""
|
||||
for build in $keys; do
|
||||
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
|
||||
if [ "$status" = "true" ]; then
|
||||
status="✅"
|
||||
else
|
||||
status="❌"
|
||||
fi
|
||||
local row="| "$build" | "$status" |\\n"
|
||||
rows="${rows}${row}"
|
||||
done
|
||||
|
||||
local table="${header}${rows}"
|
||||
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
|
||||
echo "$escaped_table"
|
||||
}
|
||||
|
||||
if [[ "${CI}" = "true" ]]; then
|
||||
# Retrieve JSON data from URL
|
||||
data=$(get_json "$CI_JSON_URL")
|
||||
# Create table from JSON data
|
||||
table=$(build_table "$data")
|
||||
echo -e "$table"
|
||||
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
|
||||
else
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
|
||||
fi
|
||||
'''
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ######################
|
||||
Comment on PR and Send status to Discord
|
||||
Send status to Discord
|
||||
###################### */
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
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{
|
||||
env.JOB_DATE = sh(
|
||||
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
|
||||
returnStdout: true).trim()
|
||||
@@ -1135,94 +1207,6 @@ EOF
|
||||
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
|
||||
}
|
||||
}
|
||||
script {
|
||||
if (env.GITHUBIMAGE =~ /lspipepr/){
|
||||
if (env.CI_TEST_ATTEMPTED == "true" || env.PUSH_ATTEMPTED == "true"){
|
||||
sh '''#! /bin/bash
|
||||
# Function to retrieve JSON data from URL
|
||||
get_json() {
|
||||
local url="$1"
|
||||
local response=$(curl -s "$url")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to retrieve JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
local json=$(echo "$response" | jq .)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to parse JSON data from $url"
|
||||
return 1
|
||||
fi
|
||||
echo "$json"
|
||||
}
|
||||
|
||||
build_table() {
|
||||
local data="$1"
|
||||
|
||||
# Get the keys in the JSON data
|
||||
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
|
||||
|
||||
# Check if keys are empty
|
||||
if [ -z "$keys" ]; then
|
||||
echo "JSON report data does not contain any keys or the report does not exist."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Build table header
|
||||
local header="| Tag | Passed |\\n| --- | --- |\\n"
|
||||
|
||||
# Loop through the JSON data to build the table rows
|
||||
local rows=""
|
||||
for build in $keys; do
|
||||
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
|
||||
if [ "$status" = "true" ]; then
|
||||
status="✅"
|
||||
else
|
||||
status="❌"
|
||||
fi
|
||||
local row="| "$build" | "$status" |\\n"
|
||||
rows="${rows}${row}"
|
||||
done
|
||||
|
||||
local table="${header}${rows}"
|
||||
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
|
||||
echo "$escaped_table"
|
||||
}
|
||||
|
||||
if [[ "${CI}" = "true" ]]; then
|
||||
# Retrieve JSON data from URL
|
||||
data=$(get_json "$CI_JSON_URL")
|
||||
# Create table from JSON data
|
||||
table=$(build_table "$data")
|
||||
echo -e "$table"
|
||||
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR for commit ${COMMIT_SHA:0:7} : \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
|
||||
else
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR for commit ${COMMIT_SHA:0:7} : \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
|
||||
fi
|
||||
'''
|
||||
} else {
|
||||
sh '''#! /bin/bash
|
||||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
|
||||
-d "{\\"body\\": \\"I am a bot, the build for PR commit ${COMMIT_SHA:0:7} failed and as a result no CI test was attempted and no images were pushed.\\"}"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
'''
|
||||
}
|
||||
cleanup {
|
||||
sh '''#! /bin/bash
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read https://github.com/linuxserver/docker-nextcloud/blob/develop/.github/CONTRIBUTING.md -->
|
||||
<!-- Please read https://github.com/linuxserver/docker-nextcloud/blob/previous/.github/CONTRIBUTING.md -->
|
||||
[](https://linuxserver.io)
|
||||
|
||||
[](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
|
||||
@@ -34,8 +34,8 @@ Find us at:
|
||||
[](https://quay.io/repository/linuxserver.io/nextcloud)
|
||||
[](https://hub.docker.com/r/linuxserver/nextcloud)
|
||||
[](https://hub.docker.com/r/linuxserver/nextcloud)
|
||||
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nextcloud/job/develop/)
|
||||
[](https://ci-tests.linuxserver.io/linuxserver/nextcloud/develop/index.html)
|
||||
[](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-nextcloud/job/previous/)
|
||||
[](https://ci-tests.linuxserver.io/linuxserver/nextcloud/previous/index.html)
|
||||
|
||||
[Nextcloud](https://nextcloud.com/) gives you access to all your files wherever you are.
|
||||
|
||||
@@ -47,7 +47,7 @@ Where are your photos and documents? With Nextcloud you pick a server of your ch
|
||||
|
||||
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/nextcloud:develop` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||
Simply pulling `lscr.io/linuxserver/nextcloud:previous` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
|
||||
|
||||
The architectures supported by this image are:
|
||||
|
||||
@@ -135,7 +135,7 @@ If you are using a reverse proxy which validates certificates, you need to [disa
|
||||
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
|
||||
|
||||
>[!NOTE]
|
||||
>Unless a parameter is flagged as 'optional', it is *mandatory* and a value must be provided.
|
||||
>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided.
|
||||
|
||||
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
|
||||
|
||||
@@ -143,7 +143,7 @@ To help you get started creating a container from this image you can either use
|
||||
---
|
||||
services:
|
||||
nextcloud:
|
||||
image: lscr.io/linuxserver/nextcloud:develop
|
||||
image: lscr.io/linuxserver/nextcloud:previous
|
||||
container_name: nextcloud
|
||||
environment:
|
||||
- PUID=1000
|
||||
@@ -169,7 +169,7 @@ docker run -d \
|
||||
-v /path/to/nextcloud/config:/config \
|
||||
-v /path/to/data:/data \
|
||||
--restart unless-stopped \
|
||||
lscr.io/linuxserver/nextcloud:develop
|
||||
lscr.io/linuxserver/nextcloud:previous
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -249,7 +249,7 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
|
||||
* Image version number:
|
||||
|
||||
```bash
|
||||
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/nextcloud:develop
|
||||
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/nextcloud:previous
|
||||
```
|
||||
|
||||
## Updating Info
|
||||
@@ -297,7 +297,7 @@ Below are the instructions for updating containers:
|
||||
* Update the image:
|
||||
|
||||
```bash
|
||||
docker pull lscr.io/linuxserver/nextcloud:develop
|
||||
docker pull lscr.io/linuxserver/nextcloud:previous
|
||||
```
|
||||
|
||||
* Stop the running container:
|
||||
@@ -334,7 +334,7 @@ cd docker-nextcloud
|
||||
docker build \
|
||||
--no-cache \
|
||||
--pull \
|
||||
-t lscr.io/linuxserver/nextcloud:develop .
|
||||
-t lscr.io/linuxserver/nextcloud:previous .
|
||||
```
|
||||
|
||||
The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static`
|
||||
@@ -347,7 +347,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **10.07.25:** - Rebase to Alpine 3.22.
|
||||
* **14.10.25:** - Rebase to Alpine 3.22.
|
||||
* **12.02.25:** - Rebase to Alpine 3.21.
|
||||
* **09.01.25:** - Fix uploading large files. Existing users should update their nginx confs.
|
||||
* **09.07.24:** - Add `previous` tag for n-1 releases.
|
||||
|
||||
+3
-3
@@ -3,10 +3,10 @@
|
||||
# jenkins variables
|
||||
project_name: docker-nextcloud
|
||||
external_type: na
|
||||
custom_version_command: "curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | sed 's|^v||g' | sort -rV | head -1"
|
||||
custom_version_command: "curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r \"first(.[] | select(.tag_name | contains($(( $(curl -sX GET https://api.github.com/repos/nextcloud/server/releases | jq -r '.[] | select(.prerelease != true) | .tag_name' | sed 's|^v||g' | awk -F '.' '{print $1}' | sort -rV | head -1) -1 ))|tostring ) and (contains( \\\\\"rc\\\\\" )|not)) | .tag_name)\" | sed 's|^v||g'"
|
||||
release_type: prerelease
|
||||
release_tag: develop
|
||||
ls_branch: develop
|
||||
release_tag: previous
|
||||
ls_branch: previous
|
||||
repo_vars:
|
||||
- BUILD_VERSION_ARG = 'NEXTCLOUD_RELEASE'
|
||||
- LS_USER = 'linuxserver'
|
||||
|
||||
+544
-497
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -92,7 +92,7 @@ app_setup_block: |
|
||||
Afterwards, you can set `"path" => OC::$SERVERROOT . "/your_custom_apps_folder",` in your `config.php` file, per the [official documentation](https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html#using-custom-app-directories).
|
||||
# init diagram
|
||||
init_diagram: |
|
||||
"nextcloud:develop": {
|
||||
"nextcloud:previous": {
|
||||
docker-mods
|
||||
base {
|
||||
fix-attr +\nlegacy cont-init
|
||||
@@ -141,10 +141,10 @@ init_diagram: |
|
||||
Base Images: {
|
||||
"baseimage-alpine-nginx:3.22" <- "baseimage-alpine:3.22"
|
||||
}
|
||||
"nextcloud:develop" <- Base Images
|
||||
"nextcloud:previous" <- Base Images
|
||||
# changelog
|
||||
changelogs:
|
||||
- {date: "10.07.25:", desc: "Rebase to Alpine 3.22."}
|
||||
- {date: "14.10.25:", desc: "Rebase to Alpine 3.22."}
|
||||
- {date: "12.02.25:", desc: "Rebase to Alpine 3.21."}
|
||||
- {date: "09.01.25:", desc: "Fix uploading large files. Existing users should update their nginx confs."}
|
||||
- {date: "09.07.24:", desc: "Add `previous` tag for n-1 releases."}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Version 2025/07/10 - Changelog: https://github.com/linuxserver/docker-nextcloud/commits/master/root/defaults/nginx/site-confs/default.conf.sample
|
||||
## Version 2025/10/14 - Changelog: https://github.com/linuxserver/docker-nextcloud/commits/previous/root/defaults/nginx/site-confs/default.conf.sample
|
||||
|
||||
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
|
||||
map $arg_v $asset_immutable {
|
||||
@@ -157,6 +157,14 @@ server {
|
||||
return 301 /remote.php$request_uri;
|
||||
}
|
||||
|
||||
# Support for the Client Push (notify_push) plugin, needs mod installed https://github.com/linuxserver/docker-mods/tree/nextcloud-notify-push
|
||||
location ^~ /push/ {
|
||||
proxy_pass http://127.0.0.1:7867/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
}
|
||||
|
||||
location / {
|
||||
# enable for basic auth
|
||||
#auth_basic "Restricted";
|
||||
|
||||
Reference in New Issue
Block a user