From 8b4b589903ea09f50068b7d26099ebc5a6f8ea2a Mon Sep 17 00:00:00 2001 From: The_Spider Date: Sun, 30 Jan 2022 14:21:07 -0600 Subject: [PATCH] . --- build-sidecar-injector.jenkins | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-sidecar-injector.jenkins b/build-sidecar-injector.jenkins index b0f8fe1..742c9a8 100644 --- a/build-sidecar-injector.jenkins +++ b/build-sidecar-injector.jenkins @@ -14,18 +14,19 @@ COPY generic-sidecar-injector/ /go/src/app/ WORKDIR /go/src/app -RUN apk add --no-cache git upx && \\ +RUN set -x && \\ + apk add --no-cache git upx && \\ addgroup -S -g 1000 app && \\ adduser --disabled-password -G app --gecos "application account" --home "/home/app" --shell "/sbin/nologin" --no-create-home --uid 1000 app && \\ go mod download && \\ - GIT_HASH="$$(git rev-parse --short HEAD) && GIT_TAG=$$(git tag | tail -1)"" && \\ + GIT_HASH="\$(git rev-parse --short HEAD) && GIT_TAG=\$(git tag | tail -1)"" && \\ CGO_ENABLED="0" && \\ GOOS="linux" && \\ GOARCH="amd64" && \\ go build \\ -v \\ -tags timetzdata \\ - -ldflags="-s -w -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=$${GIT_HASH}' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=$${GIT_TAG}'" \\ + -ldflags="-s -w -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=\${GIT_HASH}' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=\${GIT_TAG}'" \\ -installsuffix cgo \\ -o sidecarinjector \\ ./cmd/sidecarinjector && \\