-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile.test
34 lines (28 loc) · 1.21 KB
/
Dockerfile.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM golang:1.22-alpine
MAINTAINER CyberArk Software Ltd.
LABEL id="secretless-test-runner"
# On CyberArk dev laptops, golang module dependencies are downloaded with a
# corporate proxy in the middle. For these connections to succeed we need to
# configure the proxy CA certificate in build containers.
#
# To allow this script to also work on non-CyberArk laptops where the CA
# certificate is not available, we copy the (potentially empty) directory
# and update container certificates based on that, rather than rely on the
# CA file itself.
ADD build_ca_certificate /usr/local/share/ca-certificates/
RUN update-ca-certificates
WORKDIR /secretless
RUN apk add -u curl \
gcc \
git \
mercurial \
musl-dev
COPY go.mod go.sum /secretless/
COPY third_party/ /secretless/third_party
RUN go mod download
# go-junit-report => Convert go test output to junit xml
# gocov => converts native coverage output to gocov's JSON interchange format
# gocov-xml => converts gocov format to XML for use with Jenkins/Cobertura
RUN go install github.com/jstemmer/go-junit-report@latest && \
go install github.com/axw/gocov/gocov@latest && \
go install github.com/AlekSi/gocov-xml@latest