From 50411ffe0862e0324132e763918055d53dabef3c Mon Sep 17 00:00:00 2001 From: The_Spider Date: Wed, 30 Mar 2022 10:35:35 -0500 Subject: [PATCH] moves docker file varible defination to fit other file formats. --- build-alpine.jenkins | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build-alpine.jenkins b/build-alpine.jenkins index b0ee3f6..4b933ee 100644 --- a/build-alpine.jenkins +++ b/build-alpine.jenkins @@ -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 " - -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 " + +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()) } }