Switched to node builder
This commit is contained in:
parent
7f15e9d076
commit
5ddec20d0b
15
Dockerfile
15
Dockerfile
@ -1,22 +1,17 @@
|
|||||||
# Base on latest (edge) alpine image
|
# Base on latest (edge) alpine image
|
||||||
FROM harbor.ervine.dev/library/x86_64/alpine/alpine-3.11
|
FROM harbor.ervine.dev/library/x86_64/alpine/alpine:3.12
|
||||||
|
|
||||||
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
MAINTAINER “Jonathan Ervine” <docker@ervine.org>
|
||||||
|
|
||||||
# Install updates
|
# Install updates
|
||||||
ENV LANG='en_US.UTF-8' \
|
ENV LANG='en_US.UTF-8' \
|
||||||
LANGUAGE='en_US.UTF-8' \
|
LANGUAGE='en_US.UTF-8' \
|
||||||
TERM='xterm' \
|
TERM='xterm'
|
||||||
ZNC_USER='znc' \
|
|
||||||
ZNC_GROUP='znc' \
|
|
||||||
ZNC_UID='1003' \
|
|
||||||
ZNC_GID='1003'
|
|
||||||
|
|
||||||
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
|
||||||
apk update && \
|
apk update && \
|
||||||
apk -U upgrade && \
|
apk -U upgrade --ignore base-layout && \
|
||||||
apk -U add \
|
apk -U add znc
|
||||||
znc
|
|
||||||
|
|
||||||
ADD UTC /etc/localtime
|
ADD UTC /etc/localtime
|
||||||
|
|
||||||
@ -26,6 +21,4 @@ EXPOSE 6667 8080
|
|||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
|
||||||
USER $ZNC_USER
|
|
||||||
|
|
||||||
CMD [ "/usr/bin/znc", "-d", "/config/", "-f" ]
|
CMD [ "/usr/bin/znc", "-d", "/config/", "-f" ]
|
||||||
|
|||||||
48
Jenkinsfile
vendored
48
Jenkinsfile
vendored
@ -1,17 +1,35 @@
|
|||||||
node("docker-node") {
|
podTemplate(yaml: """
|
||||||
docker.withRegistry('https://harbor.ervine.dev', 'jenkins-to-harbor') {
|
kind: Pod
|
||||||
|
spec:
|
||||||
git branch: '3.11.3', url: "ssh://git@git.ervine.org:2222/jonny/x86_64-alpine-znc", credentialsId: 'jenkins-to-git'
|
containers:
|
||||||
|
- name: kaniko
|
||||||
sh "git rev-parse HEAD > .git/commit-id"
|
image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251
|
||||||
def commit_id = readFile('.git/commit-id').trim()
|
imagePullPolicy: Always
|
||||||
println commit_id
|
command:
|
||||||
|
- /busybox/cat
|
||||||
stage "build"
|
tty: true
|
||||||
def app = docker.build "library/x86_64/alpine/znc"
|
volumeMounts:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
stage "publish"
|
mountPath: /kaniko/.docker
|
||||||
app.push("${env.BUILD_NUMBER}")
|
volumes:
|
||||||
app.push("latest")
|
- 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-znc.git', credentialsId: 'jenkins-to-git'
|
||||||
|
container('kaniko') {
|
||||||
|
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/library/x86_64/alpine/znc:3.12'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user