Skip to content

Commit

Permalink
Fix Docker acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpreese committed Feb 25, 2020
1 parent f5e55f5 commit e247288
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ CODE_OF_CONDUCT.md
LICENSE
contrib
docs
conftest
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ FROM base as test
RUN go test -v ./...

## ACCEPTANCE STAGE ##
FROM bats/bats:v1.1.0 as acceptance
COPY --from=builder /app/conftest /
COPY acceptance.bats /acceptance.bats
COPY examples /examples
FROM base as acceptance
COPY --from=builder /app/conftest /app/conftest

RUN apk add --update npm bash
RUN npm install -g bats

RUN bats acceptance.bats

## EXAMPLES STAGE ##
FROM golang:1.13-alpine as examples
FROM base as examples
ENV TERRAFORM_VERSION=0.12.0-rc1 \
KUSTOMIZE_VERSION=2.0.3

Expand All @@ -44,6 +46,7 @@ RUN go get -u cuelang.org/go/cmd/cue

WORKDIR /examples

## RELEASE ##
FROM alpine:latest
COPY --from=builder /app/conftest /
RUN ln -s /conftest /usr/local/bin/conftest
Expand Down

0 comments on commit e247288

Please sign in to comment.