new file: Dockerfile
new file: Jenkinsfile new file: UTC new file: start.sh
This commit is contained in:
parent
c1287d9e45
commit
060913c6ae
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
# Base on latest (edge) alpine image
|
||||
FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11
|
||||
|
||||
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
||||
|
||||
# Install updates
|
||||
# Create mediaservice user
|
||||
ENV LANG='en_US.UTF-8' \
|
||||
LANGUAGE='en_US.UTF-8' \
|
||||
TERM='xterm'
|
||||
|
||||
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk -U upgrade && \
|
||||
apk -U add \
|
||||
python git py-pillow
|
||||
|
||||
ADD UTC /etc/localtime
|
||||
|
||||
RUN git clone https://github.com/Hellowlol/HTPC-Manager && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY start.sh /usr/local/bin/start.sh
|
||||
|
||||
EXPOSE 8085
|
||||
|
||||
CMD [ "/usr/local/bin/start.sh" ]
|
||||
27
Jenkinsfile
vendored
Normal file
27
Jenkinsfile
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
node("docker-node") {
|
||||
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
|
||||
|
||||
git branch: "3.11.6", url: "ssh://git@git.ervine.org/jonny/x86_64-alpine-htpcmgr", credentialsId: 'jenkins-to-gogs'
|
||||
|
||||
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/htpc-mgr"
|
||||
|
||||
stage "publish"
|
||||
app.push("${env.BUILD_NUMBER}")
|
||||
app.push("latest")
|
||||
|
||||
stage('Deploy on K8s'){
|
||||
sh "/usr/local/bin/kubectl -n media delete po htpc-0"
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user