-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEarthfile
31 lines (26 loc) · 869 Bytes
/
Earthfile
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
31
VERSION 0.6
FROM golang:1.19
WORKDIR /vault-plugin-database-planetscale
deps:
COPY go.mod go.sum ./
RUN go mod download
SAVE ARTIFACT go.mod AS LOCAL go.mod
SAVE ARTIFACT go.sum AS LOCAL go.sum
build:
FROM +deps
COPY *.go .
COPY --dir ./planetscale-database-plugin .
RUN CGO_ENABLED=0 go build -o bin/vault-plugin-database-planetscale planetscale-database-plugin/main.go
SAVE ARTIFACT bin/vault-plugin-database-planetscale /auth0 AS LOCAL bin/vault-plugin-database-planetscale
test:
FROM +deps
COPY *.go .
ARG TEST_AUTH0_DOMAIN=https://test-stratos-host.us.auth0.com
RUN --secret TEST_AUTH0_ACCESS_TOKEN TEST_AUTH0_DOMAIN=$TEST_AUTH0_DOMAIN CGO_ENABLED=0 go test github.com/bloominlabs/vault-plugin-database-planetscale
dev:
BUILD +build
LOCALLY
RUN bash ./scripts/dev.sh
all:
BUILD +build
BUILD +test