From 9a50641854623ac36508c3f07522dc33fd69cd6e Mon Sep 17 00:00:00 2001 From: Kegan Myers Date: Mon, 29 Jun 2020 02:03:10 -0500 Subject: [PATCH] initial commit --- .dockerignore | 1 + Dockerfile | 12 ++++++++++++ Jenkinsfile | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 Jenkinsfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a17eae3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:20.04 +RUN apt-get update && \ + apt-get install -y wget gnupg2 && \ + wget -q -O - https://apt.mopidy.com/mopidy.gpg | apt-key add - && \ + wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list && \ + apt-get update && \ + apt-get install -y mopidy mopidy-gmusic mopidy-local mopidy-mpd mopidy-podcast && \ + apt-get remove -y wget && \ + apt-get autoremove -y && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* +CMD mopidy diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2e90737 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,24 @@ +pipeline { + agent any + stages { + stage('build') { + steps { + checkout scm + script { + sh 'git rev-parse HEAD > commit' + def gitCommit = readFile('commit').trim() + def registryHost = "registry.terrible.network" + def imageName = "${registryHost}/terribleplan/mopidy" + + // build + def app = docker.build("${imageName}:${gitCommit}") + // beta push + docker.withRegistry("https://${registryHost}", "registry-terrible-network") { + app.push("latest") + } + } + } + } + } +} +