forked from mendersoftware/workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.acceptance-testing.worker
30 lines (26 loc) · 1.24 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
26
27
28
29
30
FROM golang:1.16.3-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.13.4
RUN apk add --no-cache ca-certificates xz
COPY --from=builder /go/src/github.com/mendersoftware/workflows/workflows-test /usr/bin
WORKDIR /etc/workflows/definitions
COPY ./worker/config.yaml /etc/workflows/config.yaml
COPY ./worker/decommission_device.json .
COPY ./worker/deploy_device_configuration.json .
COPY ./worker/provision_device.json .
COPY ./worker/update_device_status.json .
COPY ./worker/update_device_inventory.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,deploy_device_configuration,provision_device,update_device_status,update_device_inventory --excluded-workflows=generate_artifact" \
]