diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index b4f4615..e2f0398 100755 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -18,7 +18,7 @@ jobs: fi echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SONARR_MASTER\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sX GET https://services.sonarr.tv/v1/download/master | jq -r '.version') + EXT_RELEASE=$(curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch=="main") | .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 master" diff --git a/Dockerfile b/Dockerfile index 6b6e5ea..700b17d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,30 +10,30 @@ LABEL maintainer="aptalca" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" ENV XDG_CONFIG_HOME="/config/xdg" -ENV SONARR_BRANCH="master" +ENV SONARR_BRANCH="main" RUN \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - jq && \ + jq && \ echo "**** install sonarr ****" && \ mkdir -p /app/sonarr/bin && \ - if [ -z ${SONARR_VERSION+x} ]; then \ - SONARR_VERSION=$(curl -sX GET https://services.sonarr.tv/v1/download/${SONARR_BRANCH} \ - | jq -r '.version'); \ + if [ -z ${SONARR_VERSION+x} ]; then \ + SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \ + | jq -r ".[] | select(.branch==\"$SONARR_BRANCH\") | .version"); \ fi && \ curl -o \ - /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v2/${SONARR_BRANCH}/mono/NzbDrone.${SONARR_BRANCH}.${SONARR_VERSION}.mono.tar.gz" && \ + /tmp/sonarr.tar.gz -L \ + "https://download.sonarr.tv/v3/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux.tar.gz" && \ tar xf \ - /tmp/sonarr.tar.gz -C \ - /app/sonarr/bin --strip-components=1 && \ + /tmp/sonarr.tar.gz -C \ + /app/sonarr/bin --strip-components=1 && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ - /tmp/* \ - /var/tmp/* + /tmp/* \ + /var/tmp/* # add local files COPY root/ / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 3f1882c..d9a452c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -10,30 +10,30 @@ LABEL maintainer="aptalca" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" ENV XDG_CONFIG_HOME="/config/xdg" -ENV SONARR_BRANCH="master" +ENV SONARR_BRANCH="main" RUN \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - jq && \ + jq && \ echo "**** install sonarr ****" && \ mkdir -p /app/sonarr/bin && \ - if [ -z ${SONARR_VERSION+x} ]; then \ - SONARR_VERSION=$(curl -sX GET https://services.sonarr.tv/v1/download/${SONARR_BRANCH} \ - | jq -r '.version'); \ + if [ -z ${SONARR_VERSION+x} ]; then \ + SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \ + | jq -r ".[] | select(.branch==\"$SONARR_BRANCH\") | .version"); \ fi && \ curl -o \ - /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v2/${SONARR_BRANCH}/mono/NzbDrone.${SONARR_BRANCH}.${SONARR_VERSION}.mono.tar.gz" && \ + /tmp/sonarr.tar.gz -L \ + "https://download.sonarr.tv/v3/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux.tar.gz" && \ tar xf \ - /tmp/sonarr.tar.gz -C \ - /app/sonarr/bin --strip-components=1 && \ + /tmp/sonarr.tar.gz -C \ + /app/sonarr/bin --strip-components=1 && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ - /tmp/* \ - /var/tmp/* + /tmp/* \ + /var/tmp/* # add local files COPY root/ / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 944f6e7..ef4c046 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -10,30 +10,30 @@ LABEL maintainer="aptalca" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" ENV XDG_CONFIG_HOME="/config/xdg" -ENV SONARR_BRANCH="master" +ENV SONARR_BRANCH="main" RUN \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - jq && \ + jq && \ echo "**** install sonarr ****" && \ mkdir -p /app/sonarr/bin && \ - if [ -z ${SONARR_VERSION+x} ]; then \ - SONARR_VERSION=$(curl -sX GET https://services.sonarr.tv/v1/download/${SONARR_BRANCH} \ - | jq -r '.version'); \ + if [ -z ${SONARR_VERSION+x} ]; then \ + SONARR_VERSION=$(curl -sX GET http://services.sonarr.tv/v1/releases \ + | jq -r ".[] | select(.branch==\"$SONARR_BRANCH\") | .version"); \ fi && \ curl -o \ - /tmp/sonarr.tar.gz -L \ - "https://download.sonarr.tv/v2/${SONARR_BRANCH}/mono/NzbDrone.${SONARR_BRANCH}.${SONARR_VERSION}.mono.tar.gz" && \ + /tmp/sonarr.tar.gz -L \ + "https://download.sonarr.tv/v3/${SONARR_BRANCH}/${SONARR_VERSION}/Sonarr.${SONARR_BRANCH}.${SONARR_VERSION}.linux.tar.gz" && \ tar xf \ - /tmp/sonarr.tar.gz -C \ - /app/sonarr/bin --strip-components=1 && \ + /tmp/sonarr.tar.gz -C \ + /app/sonarr/bin --strip-components=1 && \ echo "**** cleanup ****" && \ apt-get clean && \ rm -rf \ - /tmp/* \ - /var/tmp/* + /tmp/* \ + /var/tmp/* # add local files COPY root/ / diff --git a/Jenkinsfile b/Jenkinsfile index 40aed07..043f526 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -103,7 +103,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sX GET https://services.sonarr.tv/v1/download/master | jq -r '.version' ''', + script: ''' curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch=="main") | .version' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/README.md b/README.md index f4adc8f..bd632cd 100644 --- a/README.md +++ b/README.md @@ -63,10 +63,10 @@ This image provides various versions that are available via tags. `latest` tag u | Tag | Description | | :----: | --- | -| latest | Stable releases from Sonarr (currently v2) | -| develop | Development releases from Sonarr (currently v2) | -| preview | Preview releases from Sonarr (currently v3) | -| 5.14 | Stable Sonarr releases, but run on Mono 5.14 | +| latest | Stable releases from Sonarr (currently v3) | +| develop | Development (nightly branch) releases from Sonarr (currently v3) | +| preview | DEPRECATED - Preview releases from Sonarr (currently v3) | +| 5.14 | DEPRECATED - Stable Sonarr releases, but run on Mono 5.14 | ## Usage @@ -239,6 +239,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **10.03.21:** - Upgrade to Sonarr v3. Existing users are highly recommended to make a backup prior to update. * **18.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. * **05.04.20:** - Move app to /app. * **01.08.19:** - Rebase to Linuxserver LTS mono version. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index cc10c94..00d1ce4 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 https://services.sonarr.tv/v1/download/master | jq -r '.version'" +custom_version_command: "curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch==\"main\") | .version'" release_type: stable release_tag: latest ls_branch: master diff --git a/readme-vars.yml b/readme-vars.yml index ed0ebb5..7323381 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -17,10 +17,10 @@ available_architectures: # development version development_versions: true development_versions_items: - - { tag: "latest", desc: "Stable releases from Sonarr (currently v2)" } - - { tag: "develop", desc: "Development releases from Sonarr (currently v2)" } - - { tag: "preview", desc: "Preview releases from Sonarr (currently v3)" } - - { tag: "5.14", desc: "Stable Sonarr releases, but run on Mono 5.14" } + - { tag: "latest", desc: "Stable releases from Sonarr (currently v3)" } + - { tag: "develop", desc: "Development (nightly branch) releases from Sonarr (currently v3)" } + - { tag: "preview", desc: "DEPRECATED - Preview releases from Sonarr (currently v3)" } + - { tag: "5.14", desc: "DEPRECATED - Stable Sonarr releases, but run on Mono 5.14" } # container parameters param_container_name: "{{ project_name }}" @@ -50,6 +50,7 @@ app_setup_block: | # changelog changelogs: + - { date: "10.03.21:", desc: "Upgrade to Sonarr v3. Existing users are highly recommended to make a backup prior to update." } - { date: "18.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." } - { date: "05.04.20:", desc: "Move app to /app." } - { date: "01.08.19:", desc: "Rebase to Linuxserver LTS mono version." } diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 9f71932..368f9ef 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,8 +1,8 @@ #!/usr/bin/with-contenv bash # cleanup pid if it exists -[[ -e /config/nzbdrone.pid ]] && \ - rm -rf /config/nzbdrone.pid +[[ -e /config/sonarr.pid ]] && \ + rm -rf /config/sonarr.pid # permissions chown -R abc:abc \ diff --git a/root/etc/services.d/sonarr/run b/root/etc/services.d/sonarr/run index 516eb67..b519d99 100644 --- a/root/etc/services.d/sonarr/run +++ b/root/etc/services.d/sonarr/run @@ -8,5 +8,5 @@ fi cd /app/sonarr/bin || exit exec \ - s6-setuidgid abc mono --debug NzbDrone.exe \ - -nobrowser -data=/config + s6-setuidgid abc mono --debug Sonarr.exe \ + -nobrowser -data=/config