Add block for git-credential
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4422f1f582
commit
a8b2c78fe3
1 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,15 @@
|
||||||
FROM golang:alpine as builder
|
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 }}
|
COPY . /go/src/{{ .package }}
|
||||||
WORKDIR /go/src/{{ .package }}
|
WORKDIR /go/src/{{ .package }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue