Skip to content

Commit 4687e33

Browse files
committed
Fix Docker builds and compose args for different providers
1 parent 27af530 commit 4687e33

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ ADD ./internal/ $APP_ROOT/src/internal/
3131

3232
ARG SERVER_LDFLAGS
3333
# Build server for deployment
34-
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -ldflags "${SERVER_LDFLAGS}" -o rekor-server ./cmd/rekor-server-${CLOUD_PROVIDER}
34+
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -tags ${CLOUD_PROVIDER} -ldflags "${SERVER_LDFLAGS}" -o rekor-server ./cmd/rekor-server-${CLOUD_PROVIDER}
3535
# Build server for debugger
36-
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -gcflags "all=-N -l" -ldflags "${SERVER_LDFLAGS}" -o rekor-server_debug ./cmd/rekor-server-${CLOUD_PROVIDER}
36+
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -tags ${CLOUD_PROVIDER} -gcflags "all=-N -l" -ldflags "${SERVER_LDFLAGS}" -o rekor-server_debug ./cmd/rekor-server-${CLOUD_PROVIDER}
3737

3838
# Multi-stage deployment build
3939
FROM golang:1.25.3@sha256:6d4e5e74f47db00f7f24da5f53c1b4198ae46862a47395e30477365458347bf2 AS deploy

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ko-local: ## Build container images locally using ko
101101
ko publish --base-import-paths \
102102
--tags $(GIT_VERSION)-aws --tags $(GIT_HASH) --image-refs rekorImagerefs-aws \
103103
github.com/sigstore/rekor-tiles/v2/cmd/rekor-server-aws
104-
cat rekorImagerefs-gcp rekorImagerefs-aws > rekorImagerefs
104+
cp rekorImagerefs-gcp rekorImagerefs
105105

106106
# generate Go protobuf code
107107
protos:

compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ services:
4949
build:
5050
context: .
5151
target: deploy
52+
args:
53+
CLOUD_PROVIDER: gcp
5254
environment:
5355
- SPANNER_EMULATOR_HOST=spanner:9010
5456
- STORAGE_EMULATOR_HOST=gcs:7080

docker-compose-aws.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ services:
7474
build:
7575
context: .
7676
target: deploy
77+
args:
78+
CLOUD_PROVIDER: aws
7779
environment:
7880
- AWS_ACCESS_KEY_ID=minioadmin
7981
- AWS_SECRET_ACCESS_KEY=minioadmin

tests/sharding/compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ services:
104104
build:
105105
context: ../..
106106
target: deploy
107+
args:
108+
CLOUD_PROVIDER: gcp
107109
environment:
108110
- SPANNER_EMULATOR_HOST=spanner1:9010
109111
- STORAGE_EMULATOR_HOST=gcs1:7080
@@ -145,6 +147,8 @@ services:
145147
build:
146148
context: ../..
147149
target: deploy
150+
args:
151+
CLOUD_PROVIDER: gcp
148152
environment:
149153
- SPANNER_EMULATOR_HOST=spanner2:9010
150154
- STORAGE_EMULATOR_HOST=gcs2:7080

0 commit comments

Comments
 (0)