Skip to content

Commit 95028e2

Browse files
committed
fix Dockefile, remove go build -a, fix integration_test.go, skip TestFIPS if QA_AWS_ACCESS_KEY is empty in secrets
1 parent 89492ee commit 95028e2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# syntax=docker/dockerfile:1
12
ARG CLICKHOUSE_VERSION=latest
23
ARG CLICKHOUSE_IMAGE=clickhouse/clickhouse-server
34

@@ -33,7 +34,7 @@ FROM builder-base AS builder-race
3334
ARG TARGETPLATFORM
3435
COPY ./ /src/
3536
RUN mkdir -p ./clickhouse-backup/
36-
RUN --mount=type=cache,id=clickhouse-backup-gobuild,target=/root/ GOOS=$( echo ${TARGETPLATFORM} | cut -d "/" -f 1) GOARCH=$( echo ${TARGETPLATFORM} | cut -d "/" -f 2) CC=musl-gcc CGO_ENABLED=1 go build -a -cover -buildvcs=false -ldflags "-X 'main.version=race' -linkmode=external -extldflags '-static'" -race -o ./clickhouse-backup/clickhouse-backup-race ./cmd/clickhouse-backup
37+
RUN --mount=type=cache,id=clickhouse-backup-gobuild,target=/root/ GOOS=$( echo ${TARGETPLATFORM} | cut -d "/" -f 1) GOARCH=$( echo ${TARGETPLATFORM} | cut -d "/" -f 2) CC=musl-gcc CGO_ENABLED=1 go build -cover -buildvcs=false -ldflags "-X 'main.version=race' -linkmode=external -extldflags '-static'" -race -o ./clickhouse-backup/clickhouse-backup-race ./cmd/clickhouse-backup
3738
RUN cp -l ./clickhouse-backup/clickhouse-backup-race /bin/clickhouse-backup && echo "$(ldd ./clickhouse-backup/clickhouse-backup-race 2>&1 || true)" | grep -c "not a dynamic executable"
3839
RUN --mount=type=cache,id=clickhouse-backup-gobuild,target=/root/ GOOS=$( echo ${TARGETPLATFORM} | cut -d "/" -f 1) GOARCH=$( echo ${TARGETPLATFORM} | cut -d "/" -f 2) GOEXPERIMENT=boringcrypto CC=musl-gcc CGO_ENABLED=1 go build -cover -buildvcs=false -ldflags "-X 'main.version=race-fips' -linkmode=external -extldflags '-static'" -race -o ./clickhouse-backup/clickhouse-backup-race-fips ./cmd/clickhouse-backup
3940
RUN cp -l ./clickhouse-backup/clickhouse-backup-race-fips /bin/clickhouse-backup-fips && echo "$(ldd ./clickhouse-backup/clickhouse-backup-race-fips 2>&1 || true)" | grep -c "not a dynamic executable"

test/integration/integration_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,9 @@ func TestInnerTablesMaterializedView(t *testing.T) {
924924
ch.queryWithNoError(r, "DROP DATABASE test_mv")
925925
}
926926
func TestFIPS(t *testing.T) {
927+
if os.Getenv("QA_AWS_ACCESS_KEY") == "" {
928+
t.Skip("QA_AWS_ACCESS_KEY is empty, TestFIPS will skip")
929+
}
927930
ch := &TestClickHouse{}
928931
r := require.New(t)
929932
ch.connectWithWait(r, 1*time.Second, 10*time.Second)

0 commit comments

Comments
 (0)