Compare commits

..

No commits in common. "master" and "3.11.3" have entirely different histories.

4 changed files with 32 additions and 79 deletions

View File

@ -1,27 +1,25 @@
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12 AS builder
LABEL maintainer="Jonathan Ervine <docker@ervine.org>"
FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
WORKDIR /root/
ENV GETIPLAYER_OUTPUT=/config GETIPLAYER_PROFILE=/config/.get_iplayer PUID=1000 PGID=100 PORT=1935
EXPOSE 1935
VOLUME /config
RUN apk --update --no-cache add git cmake make gcc g++ linux-headers jq
RUN apk --update --no-cache add ffmpeg perl-cgi perl-mojolicious perl-lwp-protocol-https perl-xml-libxml jq logrotate su-exec tini
RUN git clone https://git.ervine.org/jonny/atomicparsley atomic && \
cd atomic && \
cmake . && cmake --build . --config Release && \
wget -qO - "https://api.github.com/repos/get-iplayer/get_iplayer/releases/latest" > /tmp/latest.json && \
RUN wget -qnd "https://bitbucket.org/shield007/atomicparsley/raw/68337c0c05ec4ba2ad47012303121aaede25e6df/downloads/build_linux_x86_64/AtomicParsley" && \
install -m 755 -t /usr/local/bin ./AtomicParsley && \
rm ./AtomicParsley
RUN wget -qO - "https://api.github.com/repos/get-iplayer/get_iplayer/releases/latest" > /tmp/latest.json && \
echo get_iplayer release `jq -r .name /tmp/latest.json` && \
wget -qO - "`jq -r .tarball_url /tmp/latest.json`" | tar -zxf - && \
chmod 755 get-iplayer*/get_iplayer get-iplayer*/get_iplayer.cgi && \
echo "Working directory $PWD" && \
echo $PWD
cd get-iplayer* && \
install -m 755 -t /usr/local/bin ./get_iplayer ./get_iplayer.cgi && \
cd / && \
rm -rf get-iplayer* && \
rm /tmp/latest.json
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12
RUN apk --update --no-cache add ffmpeg perl-cgi perl-mojolicious perl-lwp-protocol-https perl-xml-libxml logrotate su-exec tini
COPY --from=builder /root/atomic/AtomicParsley /usr/local/bin/AtomicParsley
COPY --from=builder /root/atomic/get-iplayer*/get_iplayer /usr/local/bin/get_iplayer
COPY --from=builder /root/atomic/get-iplayer*/get_iplayer.cgi /usr/local/bin/get_iplayer.cgi
COPY files/ /
ENTRYPOINT ["/sbin/tini", "--"]

View File

@ -1,26 +0,0 @@
FROM harbor.ervine.dev/public/x86_64/alpine:v3.12
LABEL Maintainer = "Jonathan Ervine <docker@ervine.org>"
ENV GETIPLAYER_OUTPUT=/config GETIPLAYER_PROFILE=/config/.get_iplayer PUID=1000 PGID=100 PORT=1935
EXPOSE 1935
VOLUME /config
RUN apk --update --no-cache add ffmpeg perl-cgi perl-mojolicious perl-lwp-protocol-https perl-xml-libxml jq logrotate su-exec tini
RUN wget -qnd "https://bitbucket.org/shield007/atomicparsley/raw/68337c0c05ec4ba2ad47012303121aaede25e6df/downloads/build_linux_x86_64/AtomicParsley" && \
install -m 755 -t /usr/local/bin ./AtomicParsley && \
rm ./AtomicParsley
RUN wget -qO - "https://api.github.com/repos/get-iplayer/get_iplayer/releases/latest" > /tmp/latest.json && \
echo get_iplayer release `jq -r .name /tmp/latest.json` && \
wget -qO - "`jq -r .tarball_url /tmp/latest.json`" | tar -zxf - && \
cd get-iplayer* && \
install -m 755 -t /usr/local/bin ./get_iplayer ./get_iplayer.cgi && \
cd / && \
rm -rf get-iplayer* && \
rm /tmp/latest.json
COPY files/ /
ENTRYPOINT ["/sbin/tini", "--"]
CMD /start

51
Jenkinsfile vendored
View File

@ -1,37 +1,18 @@
podTemplate(yaml: """
kind: Pod
spec:
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251
imagePullPolicy: Always
command:
- /busybox/cat
tty: true
volumeMounts:
- name: jenkins-docker-cfg
mountPath: /kaniko/.docker
volumes:
- name: jenkins-docker-cfg
projected:
sources:
- secret:
name: regcred
items:
- key: .dockerconfigjson
path: config.json
"""
) {
node(POD_LABEL) {
stage('Build with Kaniko') {
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-get_iplayer.git', credentialsId: 'jenkins-to-git'
container('kaniko') {
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/get_iplayer:3.26'
}
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-get_iplayer", credentialsId: 'jenkins-to-git'
sh "git rev-parse HEAD > .git/commit-id"
def commit_id = readFile('.git/commit-id').trim()
println commit_id
stage "build"
def app = docker.build "library/x86_64/alpine/get_iplayer"
stage "publish"
app.push("${env.BUILD_NUMBER}")
app.push("3.25")
app.push("latest")
}
stage('Notify gchat') {
hangoutsNotify message: "Alpine Linux 3.12.1 with BBC iPlayer has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false
}
}
}

0
files/start Normal file → Executable file
View File