Add block for git-credential

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-09-13 01:42:28 +02:00
parent 4422f1f582
commit a8b2c78fe3
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,5 +1,15 @@
FROM golang:alpine as builder
{{ if hasFeature "private-mods" -}}
ARG VAULT_ADDR
ARG VAULT_TOKEN
RUN set -ex \
&& apk --no-cache add git \
&& GOPATH=/usr/local go get -u -v github.com/Luzifer/git-credential-vault \
&& git config --global credential.helper 'vault --vault-path-prefix secret/jenkins/git-credential'
{{- end }}
COPY . /go/src/{{ .package }}
WORKDIR /go/src/{{ .package }}