From 83b886d82a8830e3e7bfbd611944c94b629e38ef Mon Sep 17 00:00:00 2001 From: Jonny Ervine Date: Fri, 28 Feb 2020 09:28:46 +0000 Subject: [PATCH 01/12] modified: Jenkinsfile Set Jenkins to auto deploy to k8s on build --- Jenkinsfile | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 70f0750..8f4f4ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,12 +6,21 @@ node("docker-node") { sh "git rev-parse HEAD > .git/commit-id" def commit_id = readFile('.git/commit-id').trim() println commit_id + + try { + stage "build" + def app = docker.build "library/x86_64/alpine/tautulli" - stage "build" - def app = docker.build "library/x86_64/alpine/tautulli" - - stage "publish" - app.push("${env.BUILD_NUMBER}") - app.push("latest") + stage "publish" + app.push("${env.BUILD_NUMBER}") + app.push("latest") + + stage('Deploy on k8s'){ + sh "/usr/local/bin/kubectl -n media delete po tautulli-0" + } + } + catch (err) { + currentBuild.result = 'FAILURE' + } } } -- 2.45.2 From 9d094563abcfad384e9f9082924bb9acfb20cba3 Mon Sep 17 00:00:00 2001 From: Jonny Ervine Date: Fri, 13 Mar 2020 13:04:54 +0000 Subject: [PATCH 02/12] modified: Dockerfile Bumped to version 2.2.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 392041b..5429567 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER “Jonathan Ervine” ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='2.1.44' \ + VERSION='2.2.0' \ HTPC_USER='mediaservice' \ HTPC_GROUP='mediaservice' \ HTPC_UID='1003' \ -- 2.45.2 From 25baf2557d49abd29921ee77577755f03c2f7099 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Mon, 30 Mar 2020 16:19:41 +0800 Subject: [PATCH 03/12] modified: Dockerfile modified: Jenkinsfile Bumped to version 2.2.1 --- Dockerfile | 2 +- Jenkinsfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5429567..b1ffdd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER “Jonathan Ervine” ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='2.2.0' \ + VERSION='2.2.1' \ HTPC_USER='mediaservice' \ HTPC_GROUP='mediaservice' \ HTPC_UID='1003' \ diff --git a/Jenkinsfile b/Jenkinsfile index 8f4f4ef..e34f0ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,7 @@ node("docker-node") { stage "publish" app.push("${env.BUILD_NUMBER}") app.push("latest") + app.push("v2.2.1") stage('Deploy on k8s'){ sh "/usr/local/bin/kubectl -n media delete po tautulli-0" -- 2.45.2 From 9d1646ff0eecbb25876909f7009d46271b7b3cc3 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Sat, 2 May 2020 16:23:22 +0800 Subject: [PATCH 04/12] modified: Dockerfile modified: Jenkinsfile Bumped to version 2.2.3 --- Dockerfile | 2 +- Jenkinsfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b1ffdd0..2cc802a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER “Jonathan Ervine” ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='2.2.1' \ + VERSION='2.2.3' \ HTPC_USER='mediaservice' \ HTPC_GROUP='mediaservice' \ HTPC_UID='1003' \ diff --git a/Jenkinsfile b/Jenkinsfile index e34f0ed..b5e6d99 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,8 @@ node("docker-node") { stage "publish" app.push("${env.BUILD_NUMBER}") app.push("latest") - app.push("v2.2.1") + app.push("2.2.3") + app.push("2.2") stage('Deploy on k8s'){ sh "/usr/local/bin/kubectl -n media delete po tautulli-0" -- 2.45.2 From cc7560babd8fa9db12197fe31041ea27a18b67d8 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Wed, 20 May 2020 13:59:14 +0800 Subject: [PATCH 05/12] modified: Dockerfile modified: Jenkinsfile new file: start.sh Updated to use environment variables rather than hardcoding --- Dockerfile | 16 +++++----------- Jenkinsfile | 2 +- start.sh | 9 +++++++++ 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100755 start.sh diff --git a/Dockerfile b/Dockerfile index 2cc802a..ae90d9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,7 @@ MAINTAINER “Jonathan Ervine” ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='2.2.3' \ - HTPC_USER='mediaservice' \ - HTPC_GROUP='mediaservice' \ - HTPC_UID='1003' \ - HTPC_GID='1003' + VERSION='2.2.4' RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ apk update && \ @@ -26,12 +22,10 @@ RUN wget https://github.com/Tautulli/Tautulli/archive/v$VERSION.tar.gz && \ tar zxvf v$VERSION.tar.gz -C / && \ mv /Tautulli-$VERSION /Tautulli && \ rm *.tar.gz && \ - rm -rf /var/cache/apk/* && \ - addgroup -g $HTPC_GID $HTPC_GROUP && \ - adduser -D -u $HTPC_UID -G $HTPC_GROUP -H $HTPC_USER + rm -rf /var/cache/apk/* + +COPY start.sh /usr/local/bin/start.sh EXPOSE 8181 -USER $HTPC_USER - -CMD [ "/usr/bin/python", "/Tautulli/Tautulli.py", "--datadir", "/config", "--nofork", "--nolaunch" ] +CMD [ "/usr/local/bin/start.sh" ] diff --git a/Jenkinsfile b/Jenkinsfile index b5e6d99..56cd90c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ node("docker-node") { stage "publish" app.push("${env.BUILD_NUMBER}") app.push("latest") - app.push("2.2.3") + app.push("2.2.4") app.push("2.2") stage('Deploy on k8s'){ diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..1d9ad91 --- /dev/null +++ b/start.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +## Script to kick off Tautulli +# +addgroup -g $GID tautulli +adduser -D -u $UID -G tautulli -H tautulli +chown -R $UID:$GID /HTPC-Manager +su - $UID +/usr/bin/python /Tautulli/Tautulli.py --datadir /config --nofork --nolaunch -- 2.45.2 From c97b835b35e6e9cc72bf58d7c3bc40e04e0b43f4 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Wed, 27 May 2020 09:55:41 +0800 Subject: [PATCH 06/12] Fixed shell used in start.sh script --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 1d9ad91..425b480 100755 --- a/start.sh +++ b/start.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # ## Script to kick off Tautulli # -- 2.45.2 From 80a896dd401b596726776cfae844306853291f4d Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Wed, 27 May 2020 13:14:46 +0800 Subject: [PATCH 07/12] modified: start.sh Fixed binary directory name --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 425b480..63893e9 100755 --- a/start.sh +++ b/start.sh @@ -4,6 +4,6 @@ # addgroup -g $GID tautulli adduser -D -u $UID -G tautulli -H tautulli -chown -R $UID:$GID /HTPC-Manager +chown -R $UID:$GID /Tautulli su - $UID /usr/bin/python /Tautulli/Tautulli.py --datadir /config --nofork --nolaunch -- 2.45.2 From 3879e5a3ad549822fa2d98e82b9c37f2ef381101 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Thu, 28 May 2020 10:08:36 +0800 Subject: [PATCH 08/12] modified: start.sh Fixed usernames in startup script --- start.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 63893e9..91f175c 100755 --- a/start.sh +++ b/start.sh @@ -2,8 +2,9 @@ # ## Script to kick off Tautulli # -addgroup -g $GID tautulli -adduser -D -u $UID -G tautulli -H tautulli +USER=tautulli +addgroup -g $GID $USER +adduser -D -u $UID -G $USER -H $USER chown -R $UID:$GID /Tautulli -su - $UID +su - $USER /usr/bin/python /Tautulli/Tautulli.py --datadir /config --nofork --nolaunch -- 2.45.2 From af859738d4d2866994bb6d619d7e3a77721fc43a Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Thu, 28 May 2020 10:34:08 +0800 Subject: [PATCH 09/12] modified: start.sh USER to be read from env variable --- start.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/start.sh b/start.sh index 91f175c..e333a61 100755 --- a/start.sh +++ b/start.sh @@ -2,7 +2,6 @@ # ## Script to kick off Tautulli # -USER=tautulli addgroup -g $GID $USER adduser -D -u $UID -G $USER -H $USER chown -R $UID:$GID /Tautulli -- 2.45.2 From d96f69d016928800874a90c27134eb2d4183e26b Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Thu, 28 May 2020 14:19:06 +0800 Subject: [PATCH 10/12] modified: start.sh Fixed start up command --- start.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index e333a61..edd2ea3 100755 --- a/start.sh +++ b/start.sh @@ -4,6 +4,5 @@ # addgroup -g $GID $USER adduser -D -u $UID -G $USER -H $USER -chown -R $UID:$GID /Tautulli -su - $USER -/usr/bin/python /Tautulli/Tautulli.py --datadir /config --nofork --nolaunch +chown -R $UID:$GID /Tautulli /config +su - $USER -c "/usr/bin/python /Tautulli/Tautulli.py --datadir /config --nofork --nolaunch" -- 2.45.2 From 45b9139d427b7012633e87588ddc9640caf891a0 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Tue, 9 Jun 2020 18:00:09 +0800 Subject: [PATCH 11/12] modified: Jenkinsfile Bumped to version 3.11.6 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 56cd90c..dae7e3b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ node("docker-node") { docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') { - git branch: "3.11.3", url: "ssh://git@git.ervine.org:2222/jonny/x86_64-alpine-tautulli", credentialsId: 'jenkins-to-git' + git branch: "3.11.6", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-tautulli", credentialsId: 'jenkins-to-git' sh "git rev-parse HEAD > .git/commit-id" def commit_id = readFile('.git/commit-id').trim() -- 2.45.2 From 7c37075fcbf634bff175de41e9c3aad6f551f810 Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Fri, 3 Jul 2020 22:47:52 +0800 Subject: [PATCH 12/12] Bumped to version 2.5.2 --- Dockerfile | 2 +- Jenkinsfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae90d9b..2e5c3a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ MAINTAINER “Jonathan Ervine” ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='2.2.4' + VERSION='2.5.2' RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ apk update && \ diff --git a/Jenkinsfile b/Jenkinsfile index dae7e3b..0e4b1cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,8 +14,8 @@ node("docker-node") { stage "publish" app.push("${env.BUILD_NUMBER}") app.push("latest") - app.push("2.2.4") - app.push("2.2") + app.push("2.5.2") + app.push("2.5") stage('Deploy on k8s'){ sh "/usr/local/bin/kubectl -n media delete po tautulli-0" -- 2.45.2