Update 'build-vlmcsd.jenkins'
This commit is contained in:
parent
bbf47c44b1
commit
d3289ffff3
@ -17,6 +17,11 @@ spec:
|
||||
tty: true
|
||||
command:
|
||||
- /busybox/cat
|
||||
- name: alpine
|
||||
image: ${repository}/library/alpine:latest
|
||||
tty: true
|
||||
command:
|
||||
- /bin/sh
|
||||
""",
|
||||
) {
|
||||
node (label) {
|
||||
@ -51,8 +56,18 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
stage ("Prepare Kaniko") {
|
||||
container ("alpine") {
|
||||
stage ("Build VLMCSD") {
|
||||
sh """
|
||||
apk --no-cache add gcc make musl-dev git
|
||||
cd "${workspace}/vlmcsd"
|
||||
make
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
container ("kaniko") {
|
||||
stage ("Prepare Kaniko") {
|
||||
withCredentials([usernameColonPassword(
|
||||
credentialsId: repositoryCreds,
|
||||
variable: "dCreds",
|
||||
@ -70,29 +85,21 @@ spec:
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage("Kaniko Build & Push") {
|
||||
container ("kaniko") {
|
||||
def dockerfile = """
|
||||
FROM registry.c.test-chamber-13.lan/library/alpine:latest as BUILDER
|
||||
|
||||
RUN apk --no-cache add gcc && \\
|
||||
cd ${workspace}/vlmcsd && \\
|
||||
make
|
||||
|
||||
FROM registry.c.test-chamber-13.lan/library/alpine:latest
|
||||
|
||||
EXPOSE 1688/tcp
|
||||
FROM ${repository}/library/alpine:latest
|
||||
|
||||
RUN addgroup -g 1000 -S vlmcsd && \\
|
||||
adduser -u 1000 -G vlmcsd -S -D -h /home/vlmcsd vlmcsd
|
||||
|
||||
COPY vlmcsd/bin/vlmcsd vlmcsd/etc/vlmcsd.kmd /home/vlmcsd
|
||||
|
||||
EXPOSE 1688/tcp
|
||||
|
||||
WORKDIR /home/vlmcsd
|
||||
|
||||
COPY --from=build --chown=1000:1000 /vlmcsd/bin/vlmcsd /vlmcsd/etc/vlmcsd.kmd /home/vlmcsd/
|
||||
|
||||
ENTRYPOINT ["/bin/sh" "-c" "./vlmcsd -L 0.0.0.0:1688 -m 5 -t 5 -e -N1 -B1 -r1 -C 1033 -R 1w -A 1h -H 36446 -v -D -j ./vlmcsd.kmd"]
|
||||
ENTRYPOINT ["/bin/sh", "-c", "./vlmcsd -L 0.0.0.0:1688 -m 5 -t 5 -e -N1 -B1 -r1 -C 1033 -R 1w -A 1h -H 36446 -v -D -j ./vlmcsd.kmd"]
|
||||
"""
|
||||
writeFile (file: workspace + "/Dockerfile", text: dockerfile)
|
||||
sh "/kaniko/executor --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/vlmcsd:latest\""
|
||||
|
Reference in New Issue
Block a user