Skip to content

Commit

Permalink
Merge pull request #41 from linuxserver/RELEASE_BRANCH
Browse files Browse the repository at this point in the history
Release branch
  • Loading branch information
CHBMB authored Jun 10, 2019
2 parents fa2c08c + 823ae24 commit c9920b1
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 152 deletions.
70 changes: 23 additions & 47 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,32 @@
FROM lsiobase/python:3.9
FROM lsiobase/ubuntu:bionic

# set version label
ARG BUILD_DATE
ARG VERSION
ARG CALIBRE_COMMIT
ARG CALIBREWEB_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"

RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
file \
fontconfig-dev \
freetype-dev \
g++ \
gcc \
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
make \
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
apt-get update && \
apt-get install -y \
git \
python-pip && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
fontconfig \
freetype \
ghostscript \
imagemagick6 \
jq \
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
tiff \
zlib && \
apt-get install -y \
imagemagick \
python-minimal && \
echo "**** install calibre-web ****" && \
if [ -z ${CALIBRE_COMMIT+x} ]; then \
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
| jq -r '. | .sha'); \
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
tar xf \
/tmp/calibre-web.tar.gz -C \
/app/calibre-web --strip-components=1 && \
Expand All @@ -64,11 +36,15 @@ RUN \
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
apt-get -y purge \
git \
python-pip && \
apt-get -y autoremove && \
rm -rf \
/tmp/*

/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

# add local files
COPY root/ /

Expand Down
76 changes: 33 additions & 43 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,60 +1,39 @@
FROM lsiobase/python:arm64v8-3.9
FROM lsiobase/ubuntu:arm64v8-bionic

# set version label
ARG BUILD_DATE
ARG VERSION
ARG CALIBRE_COMMIT
ARG CALIBREWEB_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"

RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
file \
fontconfig-dev \
freetype-dev \
apt-get update && \
apt-get install -y \
g++ \
gcc \
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
git \
libffi-dev \
libjpeg-dev \
libxml2-dev \
libxslt-dev \
make \
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
libxslt1-dev \
python-pip \
zlib1g-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
fontconfig \
freetype \
ghostscript \
imagemagick6 \
jq \
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
tiff \
zlib && \
apt-get install -y \
imagemagick \
python-minimal && \
echo "**** install calibre-web ****" && \
if [ -z ${CALIBRE_COMMIT+x} ]; then \
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
| jq -r '. | .sha'); \
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
tar xf \
/tmp/calibre-web.tar.gz -C \
/app/calibre-web --strip-components=1 && \
Expand All @@ -64,10 +43,21 @@ RUN \
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
apt-get -y purge \
g++ \
gcc \
git \
libffi-dev \
libjpeg-dev \
libxml2-dev \
libxslt1-dev \
python-pip \
zlib1g-dev && \
apt-get -y autoremove && \
rm -rf \
/tmp/*
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

# add local files
COPY root/ /
Expand Down
76 changes: 33 additions & 43 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,60 +1,39 @@
FROM lsiobase/python:arm32v7-3.9
FROM lsiobase/ubuntu:arm32v7-bionic

# set version label
ARG BUILD_DATE
ARG VERSION
ARG CALIBRE_COMMIT
ARG CALIBREWEB_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"

RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
file \
fontconfig-dev \
freetype-dev \
apt-get update && \
apt-get install -y \
g++ \
gcc \
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
git \
libffi-dev \
libjpeg-dev \
libxml2-dev \
libxslt-dev \
make \
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
libxslt1-dev \
python-pip \
zlib1g-dev && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
fontconfig \
freetype \
ghostscript \
imagemagick6 \
jq \
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
tiff \
zlib && \
apt-get install -y \
imagemagick \
python-minimal && \
echo "**** install calibre-web ****" && \
if [ -z ${CALIBRE_COMMIT+x} ]; then \
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
| jq -r '. | .sha'); \
if [ -z ${CALIBREWEB_RELEASE+x} ]; then \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
tar xf \
/tmp/calibre-web.tar.gz -C \
/app/calibre-web --strip-components=1 && \
Expand All @@ -64,10 +43,21 @@ RUN \
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
apt-get -y purge \
g++ \
gcc \
git \
libffi-dev \
libjpeg-dev \
libxml2-dev \
libxslt1-dev \
python-pip \
zlib1g-dev && \
apt-get -y autoremove && \
rm -rf \
/tmp/*
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*

# add local files
COPY root/ /
Expand Down
18 changes: 9 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ pipeline {
EXT_GIT_BRANCH = 'master'
EXT_USER = 'janeczku'
EXT_REPO = 'calibre-web'
BUILD_VERSION_ARG = 'CALIBRE_COMMIT'
BUILD_VERSION_ARG = 'CALIBREWEB_RELEASE'
LS_USER = 'linuxserver'
LS_REPO = 'docker-calibre-web'
CONTAINER_NAME = 'calibre-web'
DOCKERHUB_IMAGE = 'linuxserver/calibre-web'
DEV_DOCKERHUB_IMAGE = 'lsiodev/calibre-web'
PR_DOCKERHUB_IMAGE = 'lspipepr/calibre-web'
DIST_IMAGE = 'alpine'
DIST_IMAGE = 'ubuntu'
MULTIARCH='true'
CI='true'
CI_WEB='true'
Expand Down Expand Up @@ -102,21 +102,21 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a github commit trigger determine the current commit at head
stage("Set ENV github_commit"){
// If this is a stable github release use the latest endpoint from github to determine the ext tag
stage("Set ENV github_stable"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
returnStdout: true).trim()
}
}
}
// If this is a github commit trigger Set the external release link
stage("Set ENV commit_link"){
// If this is a stable or devel github release generate the link for the build message
stage("Set ENV github_link"){
steps{
script{
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
}
}
}
Expand Down Expand Up @@ -605,7 +605,7 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "master",\
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **02.06.19:** - Rebase to Ubuntu Bionic & add Gdrive support.
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
* **23.02.19:** - Rebase to alpine 3.9, use repo version of imagemagick.
* **11.02.19:** - Add pipeline logic and multi arch.
Expand Down
6 changes: 3 additions & 3 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

# jenkins variables
project_name: docker-calibre-web
external_type: github_commit
external_type: github_stable
release_type: stable
release_tag: latest
ls_branch: master
repo_vars:
- EXT_GIT_BRANCH = 'master'
- EXT_USER = 'janeczku'
- EXT_REPO = 'calibre-web'
- BUILD_VERSION_ARG = 'CALIBRE_COMMIT'
- BUILD_VERSION_ARG = 'CALIBREWEB_RELEASE'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-calibre-web'
- CONTAINER_NAME = 'calibre-web'
- DOCKERHUB_IMAGE = 'linuxserver/calibre-web'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/calibre-web'
- PR_DOCKERHUB_IMAGE = 'lspipepr/calibre-web'
- DIST_IMAGE = 'alpine'
- DIST_IMAGE = 'ubuntu'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'
Expand Down
Loading

0 comments on commit c9920b1

Please sign in to comment.