dc9c78b210
This fixes a bug where `make cover` was missing packages. The target now covers all code except for code placed in the top level package (such as main.go) and anything placed in the testutils directory. This also fixes minor issues with the Dockerfile and the coverage_check script Note that this commit also strives to increase code coverage beyond the 80% margin Change-Id: I9e1cbcf841cc869345a00f05e39774cb3da10065
19 lines
441 B
Docker
19 lines
441 B
Docker
ARG GO_IMAGE=docker.io/golang:1.12.6-stretch
|
|
ARG RELEASE_IMAGE=scratch
|
|
FROM ${GO_IMAGE} as builder
|
|
|
|
SHELL [ "/bin/bash", "-cex" ]
|
|
ADD . /usr/src/airshipctl
|
|
WORKDIR /usr/src/airshipctl
|
|
ENV GO111MODULE=on
|
|
|
|
RUN make get-modules
|
|
|
|
ARG MAKE_TARGET=build
|
|
RUN make ${MAKE_TARGET}
|
|
|
|
FROM ${RELEASE_IMAGE} as release
|
|
COPY --from=builder /usr/src/airshipctl/bin/airshipctl /usr/local/bin/airshipctl
|
|
USER 65534
|
|
ENTRYPOINT [ "/usr/local/bin/airshipctl" ]
|