Skip to content

Commit ac773b2

Browse files
committed
addressed code review comments
Signed-off-by: Tomer Figenblat <[email protected]>
1 parent 33d0b8e commit ac773b2

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

cmd/thv-operator/Taskfile.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ vars:
2525
fi
2626
KEYCLOAK_VERSION: '26.3.2'
2727

28+
2829
tasks:
2930
kind-setup:
3031
desc: Setup a local Kind cluster
@@ -348,12 +349,14 @@ tasks:
348349
COMMIT:
349350
sh: git rev-parse --short HEAD || echo "unknown"
350351
BUILD_DATE: '{{dateInZone "2006-01-02T15:04:05Z" (now) "UTC"}}'
352+
SHA:
353+
sh: git rev-parse HEAD || echo "unknown"
351354
cmds:
352355
- >
353356
eval "{{.CONTAINER_RUNTIME}} build --load
354-
-t ghcr.io/stacklok/toolhive/operator:local-ubi
357+
-t ghcr.io/stacklok/toolhive/operator:{{.SHA}}-ubi
355358
--build-arg CODEDIR=cmd/thv-operator
356-
--build-arg VERSION=local-ubi
359+
--build-arg VERSION={{.SHA}}-ubi
357360
--build-arg COMMIT={{.COMMIT}}
358361
--build-arg BUILD_DATE={{.BUILD_DATE}}
359362
--label name=\"toolhive-operator\"
@@ -370,12 +373,14 @@ tasks:
370373
COMMIT:
371374
sh: git rev-parse --short HEAD || echo "unknown"
372375
BUILD_DATE: '{{dateInZone "2006-01-02T15:04:05Z" (now) "UTC"}}'
376+
SHA:
377+
sh: git rev-parse HEAD || echo "unknown"
373378
cmds:
374379
- >
375380
eval "{{.CONTAINER_RUNTIME}} build --load
376-
-t ghcr.io/stacklok/toolhive/proxyrunner:local-ubi
381+
-t ghcr.io/stacklok/toolhive/proxyrunner:{{.SHA}}-ubi
377382
--build-arg CODEDIR=cmd/thv-proxyrunner
378-
--build-arg VERSION=local-ubi
383+
--build-arg VERSION={{.SHA}}-ubi
379384
--build-arg COMMIT={{.COMMIT}}
380385
--build-arg BUILD_DATE={{.BUILD_DATE}}
381386
--label name=\"toolhive-proxyrunner\"

containers/operator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN CGO_ENABLED=0 LDFLAGS="-s -w \
2929
-X github.com/stacklok/toolhive/pkg/versions.BuildDate=${BUILD_DATE} \
3030
-X github.com/stacklok/toolhive/pkg/versions.BuildType=release" \
3131
GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} \
32-
go build -o main ./${CODEDIR}/main.go
32+
go build -ldflags "${LDFLAGS}" -o main ./${CODEDIR}/main.go
3333

3434
# Use micro base image to package the binary
3535
FROM registry.access.redhat.com/ubi10/ubi-micro:10.0

0 commit comments

Comments
 (0)