| 12345678910111213141516171819202122232425 |
- FROM golang:1.11-rc as builder
- COPY . /src
- WORKDIR /src
- ENV CGO_ENABLED 0
- RUN go get -d ./...
- RUN go build -o /assets/in ./cmd/in
- RUN go build -o /assets/out ./cmd/out
- RUN go build -o /assets/check ./cmd/check
- RUN set -e; for pkg in $(go list ./...); do \
- go test -o "/tests/$(basename $pkg).test" -c $pkg; \
- done
- FROM alpine:edge AS resource
- RUN apk add --no-cache bash tzdata ca-certificates unzip zip gzip tar
- COPY --from=builder assets/ /opt/resource/
- RUN chmod +x /opt/resource/*
- FROM resource AS tests
- COPY --from=builder /tests /tests
- ADD . /docker-image-resource
- RUN set -e; for test in /tests/*.test; do \
- $test -ginkgo.v; \
- done
- FROM resource
|