From e1c62724f943632de22003f96f5d59de9cacdeee Mon Sep 17 00:00:00 2001 From: Roxedus Date: Fri, 12 Jan 2024 10:51:23 +0100 Subject: [PATCH] Use new urls after upstream build changes --- .github/workflows/external_trigger.yml | 2 +- Dockerfile | 7 ++++--- Dockerfile.aarch64 | 7 ++++--- Jenkinsfile | 2 +- README.md | 3 ++- jenkins-vars.yml | 2 +- readme-vars.yml | 3 ++- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 0cf9444..a87b5f5 100755 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -20,7 +20,7 @@ jobs: echo "**** External trigger running off of develop branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SONARR_DEVELOP\". ****" echo "External trigger running off of develop branch. To disable this trigger, set a Github secret named \`PAUSE_EXTERNAL_TRIGGER_SONARR_DEVELOP\`" >> $GITHUB_STEP_SUMMARY echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sX GET http://services.sonarr.tv/v1/releases | jq -r 'first(.[] | select(.branch=="develop") | .version)') + EXT_RELEASE=$(curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.releaseChannel=="v4-nightly") | .version') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "**** Can't retrieve external version, exiting ****" FAILURE_REASON="Can't retrieve external version for sonarr branch develop" diff --git a/Dockerfile b/Dockerfile index 0e251a3..d6df4dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ LABEL maintainer="thespad" # set environment variables ENV XDG_CONFIG_HOME="/config/xdg" ENV SONARR_BRANCH="develop" +ENV SONARR_CHANNEL="v4-nightly" RUN \ echo "**** install packages ****" && \ @@ -23,15 +24,15 @@ RUN \ mkdir -p /app/sonarr/bin && \ if [ -z ${SONARR_VERSION+x} ]; then \ SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \ - | jq -r "first(.[] | select(.branch==\"$SONARR_BRANCH\") | .version)"); \ + | jq -r "first(.[] | select(.releaseChannel==\"${SONARR_CHANNEL}\") | .version)"); \ fi && \ curl -o \ /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v4/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux-musl-x64.tar.gz" && \ + "https://services.sonarr.tv/v1/update/${SONARR_BRANCH}/download?version=${SONARR_VERSION}&os=linuxmusl&runtime=netcore&arch=x64" && \ tar xzf \ /tmp/sonarr.tar.gz -C \ /app/sonarr/bin --strip-components=1 && \ - echo -e "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \ + echo -e "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${VERSION:-LocalBuild}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \ echo "**** cleanup ****" && \ rm -rf \ /app/sonarr/bin/Sonarr.Update \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index b76acfd..b656f07 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -12,6 +12,7 @@ LABEL maintainer="thespad" # set environment variables ENV XDG_CONFIG_HOME="/config/xdg" ENV SONARR_BRANCH="develop" +ENV SONARR_CHANNEL="v4-nightly" RUN \ echo "**** install packages ****" && \ @@ -23,15 +24,15 @@ RUN \ mkdir -p /app/sonarr/bin && \ if [ -z ${SONARR_VERSION+x} ]; then \ SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \ - | jq -r "first(.[] | select(.branch==\"$SONARR_BRANCH\") | .version)"); \ + | jq -r "first(.[] | select(.releaseChannel==\"${SONARR_CHANNEL}\") | .version)"); \ fi && \ curl -o \ /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v4/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux-musl-arm64.tar.gz" && \ + "https://services.sonarr.tv/v1/update/${SONARR_BRANCH}/download?version=${SONARR_VERSION}&os=linuxmusl&runtime=netcore&arch=arm64" && \ tar xzf \ /tmp/sonarr.tar.gz -C \ /app/sonarr/bin --strip-components=1 && \ - echo -e "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \ + echo -e "UpdateMethod=docker\nBranch=${SONARR_BRANCH}\nPackageVersion=${VERSION:-LocalBuild}\nPackageAuthor=[linuxserver.io](https://linuxserver.io)" > /app/sonarr/package_info && \ echo "**** cleanup ****" && \ rm -rf \ /app/sonarr/bin/Sonarr.Update \ diff --git a/Jenkinsfile b/Jenkinsfile index 696322c..8d34c9f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -115,7 +115,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sX GET http://services.sonarr.tv/v1/releases | jq -r 'first(.[] | select(.branch=="develop") | .version)' ''', + script: ''' curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.releaseChannel=="v4-nightly") | .version' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/README.md b/README.md index 0ed2c43..298ae9a 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ This image provides various versions that are available via tags. Please read th | Tag | Available | Description | | :----: | :----: |--- | -| latest | ✅ | Stable releases from Sonarr (currently v3) | +| latest | ✅ | Stable releases from Sonarr (currently v4) | | develop | ✅ | Development releases from Sonarr (currently v4) | ## Application Setup @@ -294,6 +294,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **12.01.24:** - Update download url. * **30.12.23:** - Rebase to Alpine 3.19. * **30.05.23:** - Rebase to Alpine 3.18. * **19.12.22:** - Rebase develop branch to Alpine 3.17. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index b1bd19b..9369fe9 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-sonarr external_type: na -custom_version_command: "curl -sX GET http://services.sonarr.tv/v1/releases | jq -r 'first(.[] | select(.branch==\"develop\") | .version)'" +custom_version_command: "curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.releaseChannel==\"v4-nightly\") | .version'" release_type: prerelease release_tag: develop ls_branch: develop diff --git a/readme-vars.yml b/readme-vars.yml index cedae9f..69da2c5 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -16,7 +16,7 @@ available_architectures: # development version development_versions: true development_versions_items: - - { tag: "latest", desc: "Stable releases from Sonarr (currently v3)" } + - { tag: "latest", desc: "Stable releases from Sonarr (currently v4)" } - { tag: "develop", desc: "Development releases from Sonarr (currently v4)" } # container parameters @@ -49,6 +49,7 @@ app_setup_block: | # changelog changelogs: + - { date: "12.01.24:", desc: "Update download url." } - { date: "30.12.23:", desc: "Rebase to Alpine 3.19." } - { date: "30.05.23:", desc: "Rebase to Alpine 3.18." } - { date: "19.12.22:", desc: "Rebase develop branch to Alpine 3.17." }