Bumped to master branch
This commit is contained in:
parent
1821a67a6b
commit
37bea7b218
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
# Base on latest (edge) alpine image
|
||||
FROM harbor.ervine.dev/library/x86_64/alpine/alpine:3.12
|
||||
|
||||
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
||||
|
||||
# Install updates
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LANGUAGE='en_US.UTF-8' \
|
||||
TERM='xterm' \
|
||||
VERSION='0.3.16'
|
||||
|
||||
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk -U upgrade && \
|
||||
apk -U add python3
|
||||
|
||||
RUN wget https://github.com/pymedusa/Medusa/archive/v$VERSION.tar.gz -O medusa.tar.gz && \
|
||||
tar zxvf medusa.tar.gz && \
|
||||
mv Medusa-$VERSION medusa && \
|
||||
rm -rf medusa.tar.gz && \
|
||||
apk del make gcc g++ && \
|
||||
rm -rf /tmp/src && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY start.sh /usr/local/bin/start.sh
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
CMD [ "/usr/local/bin/start.sh" ]
|
||||
28
Jenkinsfile
vendored
Normal file
28
Jenkinsfile
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
node("docker-node") {
|
||||
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
|
||||
|
||||
git branch: "master", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-medusa", credentialsId: 'jenkins-to-git'
|
||||
|
||||
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/medusa"
|
||||
|
||||
stage "publish"
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
app.push("0.3")
|
||||
app.push("0.3.16")
|
||||
|
||||
stage('Deploy on K8s'){
|
||||
sh "/usr/local/bin/kubectl -n media delete po medusa-0"
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user