From bda15ebbeb15f5ada05c2a2382a153831437fb41 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sun, 17 Nov 2024 20:07:32 +0100 Subject: [PATCH] Added GOPROXY settings --- vars/buildcontainer.groovy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vars/buildcontainer.groovy b/vars/buildcontainer.groovy index a77493f..98fe94e 100644 --- a/vars/buildcontainer.groovy +++ b/vars/buildcontainer.groovy @@ -30,7 +30,13 @@ def call(Map args) { container('kaniko') { sh """ echo "Building container with settings: ${args}" - /kaniko/executor $mirrorArg --dockerfile ${args.dockerfile} --cache=${args.cache} --cache-ttl=${args.cachettl} --context \$( pwd )/${args.context} --destination ${args.repo}/${args.container}:${args.version} + /kaniko/executor $mirrorArg \\ + --build-arg GOPROXY="$GOPROXY" \\ + --build-arg GOSUMDB="$GTOSUMDB" \\ + --dockerfile ${args.dockerfile} \\ + --cache=${args.cache} --cache-ttl=${args.cachettl} \\ + --context \$( pwd )/${args.context} \\ + --destination ${args.repo}/${args.container}:${args.version} rm -rf /kaniko/*[0-9]* && rm -rf /kaniko/Dockerfile && mkdir -p /workspace """ } -- 2.31.1