-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Simplify dockerfiles, add go vet steps, fix ldflag vals for alpine
- Simplify Dockerfiles a bit. Compiling a test binary can be sort of useful to fail quickly. But it's better to just run all the tests because that happens anyways. Also remove LABEL from all Dockerfiles, they aren't used anywhere. - Add go vet Makefile targets. This tool is built in and provides valuable info. - Make an ldflags value work better on alpine. This was more of an annoyance when looking at logs, than anything else. I have manually tested this on MacOS and Ubuntu. It works there too.
- Loading branch information
1 parent
d4c63a9
commit 6991ba7
Showing
16 changed files
with
52 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM cassandra:3.11.12 | ||
LABEL driver=cassandra role=server | ||
|
||
# Tests run on a single node, only need to expose the CQL listener port. | ||
EXPOSE 9042 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM cassandra:4.0.3 | ||
LABEL driver=cassandra role=server | ||
|
||
# Tests run on a single node, only need to expose the CQL listener port. | ||
EXPOSE 9042 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM godfish_test/client_base:latest | ||
LABEL driver=mysql role=client | ||
|
||
WORKDIR /src | ||
RUN apk update && apk --no-cache add mysql-client | ||
RUN go build -v ./drivers/mysql/godfish && \ | ||
go test -c . && go test -c ./drivers/mysql | ||
RUN apk update && \ | ||
apk --no-cache add mysql-client && \ | ||
make build-mysql | ||
|
||
COPY .ci/mysql/client.sh / | ||
ENTRYPOINT /client.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
FROM mariadb:10.6 | ||
LABEL driver=mysql role=server | ||
EXPOSE 3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
FROM mysql:5.7 | ||
LABEL driver=mysql role=server | ||
EXPOSE 3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
FROM mysql:8.0 | ||
LABEL driver=mysql role=server | ||
EXPOSE 3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM godfish_test/client_base:latest | ||
LABEL driver=postgres role=client | ||
|
||
WORKDIR /src | ||
RUN apk --no-cache add postgresql-client | ||
RUN go build -v ./drivers/postgres/godfish && \ | ||
go test -c . && go test -c ./drivers/postgres | ||
RUN apk update && \ | ||
apk --no-cache add postgresql-client && \ | ||
make build-postgres | ||
|
||
COPY .ci/postgres/client.sh / | ||
ENTRYPOINT /client.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
FROM godfish_test/client_base:latest | ||
LABEL driver=sqlite3 | ||
WORKDIR /src | ||
|
||
ENV CGO_ENABLED=1 | ||
ENV DB_DSN="file:/godfish_test.db" | ||
|
||
WORKDIR /src | ||
RUN apk update && \ | ||
apk --no-cache add musl-dev sqlite && \ | ||
go build -v ./drivers/sqlite3/godfish && \ | ||
go test -c . && \ | ||
go test -c ./drivers/sqlite3 | ||
make build-sqlite3 | ||
|
||
COPY .ci/sqlite3/client.sh / | ||
ENTRYPOINT /client.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters