From a575f9bd4e64188bfda257e26d82c0fbe4373576 Mon Sep 17 00:00:00 2001 From: aptalca Date: Wed, 10 Mar 2021 10:11:16 -0500 Subject: [PATCH] update to v3, rebase to mono 6 on focal --- .github/workflows/external_trigger.yml | 2 +- Dockerfile | 31 +++++++++++++------------- Dockerfile.aarch64 | 31 +++++++++++++------------- Dockerfile.armhf | 27 +++++++++++----------- Jenkinsfile | 2 +- README.md | 9 ++++---- jenkins-vars.yml | 2 +- readme-vars.yml | 9 ++++---- root/etc/services.d/sonarr/run | 4 ++-- 9 files changed, 61 insertions(+), 56 deletions(-) diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index f4e0c92..bab0c95 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 develop branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SONARR_DEVELOP\". ****" echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sX GET https://services.sonarr.tv/v1/download/develop | jq -r '.version') + EXT_RELEASE=$(curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch=="develop") | .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 1481dc1..4c4475e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM ghcr.io/linuxserver/baseimage-mono:LTS +FROM ghcr.io/linuxserver/baseimage-mono:focal # set version label ARG BUILD_DATE ARG VERSION ARG SONARR_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="sparklyballs" +LABEL maintainer="aptalca" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" @@ -16,28 +16,29 @@ RUN \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - jq && \ + jq \ + libmediainfo0v5 && \ 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'); \ - fi && \ + 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 +# add local files COPY root/ / -# ports and volumes +# ports and volumes EXPOSE 8989 VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 03db1b0..b79c568 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,11 +1,11 @@ -FROM ghcr.io/linuxserver/baseimage-mono:arm64v8-LTS +FROM ghcr.io/linuxserver/baseimage-mono:arm64v8-focal # set version label ARG BUILD_DATE ARG VERSION ARG SONARR_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="sparklyballs" +LABEL maintainer="aptalca" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" @@ -16,28 +16,29 @@ RUN \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - jq && \ + jq \ + libmediainfo0v5 && \ 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'); \ - fi && \ + 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 +# add local files COPY root/ / -# ports and volumes +# ports and volumes EXPOSE 8989 VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 19f2e42..491cbc0 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,11 +1,11 @@ -FROM ghcr.io/linuxserver/baseimage-mono:arm32v7-LTS +FROM ghcr.io/linuxserver/baseimage-mono:arm32v7-focal # set version label ARG BUILD_DATE ARG VERSION ARG SONARR_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="sparklyballs" +LABEL maintainer="aptalca" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" @@ -16,24 +16,25 @@ RUN \ echo "**** install packages ****" && \ apt-get update && \ apt-get install -y \ - jq && \ + jq \ + libmediainfo0v5 && \ 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'); \ - fi && \ + 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 a5dacd1..264a0fb 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/develop | jq -r '.version' ''', + script: ''' curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch=="develop") | .version' ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/README.md b/README.md index 8d198b4..d4cd634 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 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 @@ -235,6 +235,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **10.02.21:** - Rebase to mono focal baseimage. Switch to v3 nightlies. * **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 d02eea1..48a7365 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/develop | jq -r '.version'" +custom_version_command: "curl -sX GET http://services.sonarr.tv/v1/releases | jq -r '.[] | select(.branch==\"develop\") | .version'" release_type: prerelease release_tag: develop ls_branch: develop diff --git a/readme-vars.yml b/readme-vars.yml index 2fd6b87..e56d857 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 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 }}" @@ -46,6 +46,7 @@ app_setup_block: | # changelog changelogs: + - { date: "10.02.21:", desc: "Rebase to mono focal baseimage. Switch to v3 nightlies." } - { 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/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