-
Notifications
You must be signed in to change notification settings - Fork 1
/
Earthfile
48 lines (41 loc) · 1.31 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
VERSION 0.6
FROM hseeberger/scala-sbt:11.0.14.1_1.6.2_2.12.15
WORKDIR /app
sbt:
COPY project project
COPY build.sbt .
RUN sbt update
build:
FROM +sbt
COPY docker docker
COPY src src
COPY project project
RUN sbt test:compile
jar:
FROM +build
RUN sbt "set test in assembly := {}" assembly
SAVE ARTIFACT TARGET/scala-2.12/spark-clickhouse-plugin-assembly-*.jar AS LOCAL ./jars
release:
FROM +build
RUN sbt "set test in assembly := {}" release with-defaults
testimage:
FROM earthly/dind:alpine
COPY Dockerfile .
COPY src src
COPY project project
COPY build.sbt build.sbt
RUN sbt test:compile
FROM DOCKERFILE .
SAVE IMAGE sbt_ch_plugin:latest
test:
FROM earthly/dind:alpine
RUN apk add curl
COPY docker docker
COPY docker-compose.yml build.sbt .
COPY docker/wait.sh .
WITH DOCKER --load sbt_ch_plugin:latest=+testimage --compose docker-compose.yml
RUN ./wait.sh && docker run --rm --name sbt-clickhouse-plugin --network ch_network sbt_ch_plugin:latest sbt ++2.12.15 test it:test
END
WITH DOCKER --load sbt_ch_plugin:latest=+testimage --compose docker-compose.yml
RUN ./wait.sh && docker run --rm --name sbt-clickhouse-plugin --network ch_network sbt_ch_plugin:latest sbt ++2.13.10 test it:test
END