forked from mendersoftware/workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.acceptance-testing.worker
25 lines (24 loc) · 1.23 KB
/
Dockerfile.acceptance-testing.worker
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
FROM golang:1.14-alpine3.12 as builder
RUN apk add --no-cache \
xz-dev \
musl-dev \
gcc
RUN mkdir -p /go/src/github.com/mendersoftware/workflows
COPY . /go/src/github.com/mendersoftware/workflows
RUN cd /go/src/github.com/mendersoftware/workflows && \
env CGO_ENABLED=0 go test -c -o workflows-test -coverpkg $(go list ./... | grep -v vendor | grep -v mocks | grep -v test | tr '\n' ,)
FROM alpine:3.12
RUN apk add --no-cache ca-certificates xz
RUN mkdir -p /etc/workflows
COPY ./worker/config.yaml /etc/workflows/config.yaml
COPY --from=builder /go/src/github.com/mendersoftware/workflows/workflows-test /usr/bin
COPY ./worker/decommission_device.json /etc/workflows/definitions/decommission_device.json
COPY ./worker/provision_device.json /etc/workflows/definitions/provision_device.json
COPY ./worker/update_device_status.json /etc/workflows/definitions/update_device_status.json
ENTRYPOINT [ \
"/usr/bin/workflows-test", \
"-test.coverprofile=/testing/coverage-acceptance-worker.txt", \
"-acceptance-tests", \
"-test.run=TestRunMain", \
"-cli-args=--config=/etc/workflows/config.yaml worker --automigrate --workflows=decommission_device,provision_device,update_device_status --excluded-workflows=generate_artifact" \
]