moves docker file varible defination to fit other file formats.

This commit is contained in:
Hyatt 2022-03-30 10:35:35 -05:00
parent d08fba6f8a
commit 50411ffe08
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -13,18 +13,7 @@ def repository = "registry.c.test-chamber-13.lan"
def repositoryCreds = "harbor-repository-creds"
def workspace
def dockerFile = """FROM ${repository}/dockerhub/library/alpine:latest
LABEL maintainer="The_Spider <spider@smoothnet.org>"
COPY test-chamber-13.lan.root.crt /usr/local/share/ca-certificates/test-chamber-13.lan.root.crt
RUN apk add --no-cache --virtual=.packagecache ca-certificates && \\
update-ca-certificates --fresh && \\
apk del .packagecache && \\
sed -i 's/dl-cdn.alpinelinux.org/nexus.c.test-chamber-13.lan\\/repository/g' /etc/apk/repositories
"""
def dockerFile
def label = "kubernetes-${UUID.randomUUID().toString()}"
def templateName = "pipeline-worker"
@ -44,6 +33,17 @@ pipeline {
steps {
script {
workspace = pwd()
dockerFile = """FROM ${repository}/dockerhub/library/alpine:latest
LABEL maintainer="The_Spider <spider@smoothnet.org>"
COPY test-chamber-13.lan.root.crt /usr/local/share/ca-certificates/test-chamber-13.lan.root.crt
RUN apk add --no-cache --virtual=.packagecache ca-certificates && \\
update-ca-certificates --fresh && \\
apk del .packagecache && \\
sed -i 's/dl-cdn.alpinelinux.org/nexus.c.test-chamber-13.lan\\/repository/g' /etc/apk/repositories
"""
writeFile(file: workspace + "/test-chamber-13.lan.root.crt", text: functions.getLocalRootCA())
}
}