Rebase nightly to alpine

This commit is contained in:
TheSpad 2022-02-04 18:09:38 +00:00
parent e3f734c852
commit 934d7a23a8
8 changed files with 56 additions and 59 deletions

View File

@ -18,7 +18,7 @@ jobs:
fi
echo "**** External trigger running off of nightly branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_LIDARR_NIGHTLY\". ****"
echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -s "https://lidarr.servarr.com/v1/update/nightly/changes?runtime=netcore%26os=linux" | jq -r '. | .[0].version')
EXT_RELEASE=$(curl -sL https://lidarr.servarr.com/v1/update/nightly/changes?runtime=netcore%26os=linuxmusl | jq -r '.[0].version')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for lidarr branch nightly"

View File

@ -1,42 +1,41 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# set version label
ARG BUILD_DATE
ARG VERSION
ARG LIDARR_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
LABEL maintainer="Roxedus,thespad"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ARG LIDARR_BRANCH="nightly"
ENV XDG_CONFIG_HOME="/config/xdg"
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
apk add -U --upgrade --no-cache \
curl \
jq \
libchromaprint-tools \
libicu60 && \
chromaprint \
icu-libs \
sqlite-libs && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linux" \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linuxmusl" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=x64" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linuxmusl&runtime=netcore&arch=x64" && \
tar xzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo -e "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io\nPackageGlobalMessage=Warn: This image is now based on Alpine. Custom scripts using apt-get will need to be updated to use apk" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# copy local files

View File

@ -1,42 +1,41 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15
# set version label
ARG BUILD_DATE
ARG VERSION
ARG LIDARR_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
LABEL maintainer="Roxedus,thespad"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ARG LIDARR_BRANCH="nightly"
ENV XDG_CONFIG_HOME="/config/xdg"
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
apk add -U --upgrade --no-cache \
curl \
jq \
libchromaprint-tools \
libicu60 && \
chromaprint \
icu-libs \
sqlite-libs && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linux" \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linuxmusl" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=arm64" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linuxmusl&runtime=netcore&arch=arm64" && \
tar xzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo -e "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io\nPackageGlobalMessage=Warn: This image is now based on Alpine. Custom scripts using apt-get will need to be updated to use apk" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# copy local files

View File

@ -1,42 +1,41 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# set version label
ARG BUILD_DATE
ARG VERSION
ARG LIDARR_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
LABEL maintainer="Roxedus,thespad"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ARG LIDARR_BRANCH="nightly"
ENV XDG_CONFIG_HOME="/config/xdg"
RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
apk add -U --upgrade --no-cache \
curl \
jq \
libchromaprint-tools \
libicu60 && \
chromaprint \
icu-libs \
sqlite-libs && \
echo "**** install lidarr ****" && \
mkdir -p /app/lidarr/bin && \
if [ -z ${LIDARR_RELEASE+x} ]; then \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linux" \
LIDARR_RELEASE=$(curl -sL "https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/changes?runtime=netcore&os=linuxmusl" \
| jq -r '.[0].version'); \
fi && \
curl -o \
/tmp/lidarr.tar.gz -L \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linux&runtime=netcore&arch=arm" && \
tar ixzf \
/tmp/lidarr.tar.gz -C \
"https://lidarr.servarr.com/v1/update/${LIDARR_BRANCH}/updatefile?version=${LIDARR_RELEASE}&os=linuxmusl&runtime=netcore&arch=arm" && \
tar xzf \
/tmp/lidarr.tar.gz -C \
/app/lidarr/bin --strip-components=1 && \
echo "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io" > /app/lidarr/package_info && \
echo -e "UpdateMethod=docker\nBranch=${LIDARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=linuxserver.io\nPackageGlobalMessage=Warn: This image is now based on Alpine. Custom scripts using apt-get will need to be updated to use apk" > /app/lidarr/package_info && \
echo "**** cleanup ****" && \
rm -rf \
/app/lidarr/bin/Lidarr.Update \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# copy local files

26
Jenkinsfile vendored
View File

@ -17,8 +17,6 @@ pipeline {
GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0')
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
SCARF_TOKEN=credentials('scarf_api_key')
JSON_URL = 'https://lidarr.servarr.com/v1/update/nightly/changes?runtime=netcore%26os=linux'
JSON_PATH = '.[0].version'
BUILD_VERSION_ARG = 'LIDARR_RELEASE'
LS_USER = 'linuxserver'
LS_REPO = 'docker-lidarr'
@ -26,7 +24,7 @@ pipeline {
DOCKERHUB_IMAGE = 'linuxserver/lidarr'
DEV_DOCKERHUB_IMAGE = 'lsiodev/lidarr'
PR_DOCKERHUB_IMAGE = 'lspipepr/lidarr'
DIST_IMAGE = 'ubuntu'
DIST_IMAGE = 'alpine'
MULTIARCH='true'
CI='true'
CI_WEB='true'
@ -101,16 +99,16 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a custom json endpoint parse the return to get external tag
stage("Set ENV custom_json"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -s ${JSON_URL} | jq -r ". | ${JSON_PATH}" ''',
returnStdout: true).trim()
env.RELEASE_LINK = env.JSON_URL
}
}
// 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 -sL https://lidarr.servarr.com/v1/update/nightly/changes?runtime=netcore%26os=linuxmusl | jq -r '.[0].version' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
@ -911,7 +909,7 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Data change at JSON endpoint ${JSON_URL}" > releasebody.json
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "nightly",\
"name": "'${META_TAG}'",\

View File

@ -248,6 +248,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **04.02.22:** - Rebase nightly branch to Alpine.
* **30.12.21:** - Add nightly-alpine branch.
* **01.08.21:** - Add libchromaprint-tools.
* **11.07.21:** - Make the paths clearer to the user.
* **20.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information.

View File

@ -1,14 +1,12 @@
---
# jenkins variables
project_name: docker-lidarr
external_type: custom_json
external_type: na
custom_version_command: curl -sL https://lidarr.servarr.com/v1/update/nightly/changes?runtime=netcore%26os=linuxmusl | jq -r '.[0].version'
release_type: prerelease
release_tag: nightly
ls_branch: nightly
repo_vars:
- JSON_URL = 'https://lidarr.servarr.com/v1/update/nightly/changes?runtime=netcore%26os=linux'
- JSON_PATH = '.[0].version'
- BUILD_VERSION_ARG = 'LIDARR_RELEASE'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-lidarr'
@ -16,7 +14,7 @@ repo_vars:
- DOCKERHUB_IMAGE = 'linuxserver/lidarr'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/lidarr'
- PR_DOCKERHUB_IMAGE = 'lspipepr/lidarr'
- DIST_IMAGE = 'ubuntu'
- DIST_IMAGE = 'alpine'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'

View File

@ -58,6 +58,8 @@ app_setup_block: |
# changelog
changelogs:
- { date: "04.02.22:", desc: "Rebase nightly branch to Alpine." }
- { date: "30.12.21:", desc: "Add nightly-alpine branch." }
- { date: "01.08.21:", desc: "Add libchromaprint-tools." }
- { date: "11.07.21:", desc: "Make the paths clearer to the user." }
- { date: "20.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." }