Skip to content

Commit 89a0adc

Browse files
authored
feat(fips): bumping Go to 1.24 (#225)
Signed-off-by: SequeI <asiek@redhat.com>
1 parent ab3f482 commit 89a0adc

6 files changed

Lines changed: 10 additions & 14 deletions

.tekton/fetch-tsa-certs-pull-request.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ spec:
4444
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-cli ./cmd/timestamp-cli
4545
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-server ./cmd/timestamp-server
4646
go test ./...
47-
- name: go_base_image
48-
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:44fd8f88f3b6463cda15571260f9ca3a0b78d3c8c8827a338e04ab3a23581a88
4947
pipelineRef:
5048
params:
5149
- name: url

.tekton/fetch-tsa-certs-push.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ spec:
4141
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-cli ./cmd/timestamp-cli
4242
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-server ./cmd/timestamp-server
4343
go test ./...
44-
- name: go_base_image
45-
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:44fd8f88f3b6463cda15571260f9ca3a0b78d3c8c8827a338e04ab3a23581a88
4644
pipelineRef:
4745
params:
4846
- name: url

.tekton/timestamp-authority-pull-request.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ spec:
4444
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-cli ./cmd/timestamp-cli
4545
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-server ./cmd/timestamp-server
4646
go test ./...
47-
- name: go_base_image
48-
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:44fd8f88f3b6463cda15571260f9ca3a0b78d3c8c8827a338e04ab3a23581a88
4947
pipelineRef:
5048
params:
5149
- name: url

.tekton/timestamp-authority-push.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ spec:
4141
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-cli ./cmd/timestamp-cli
4242
CGO_ENABLED=0 go build -trimpath -o bin/timestamp-server ./cmd/timestamp-server
4343
go test ./...
44-
- name: go_base_image
45-
value: brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:44fd8f88f3b6463cda15571260f9ca3a0b78d3c8c8827a338e04ab3a23581a88
4644
pipelineRef:
4745
params:
4846
- name: url

Dockerfile.fetch_tsa_certs.rh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:96cfceb50f5323efa1aa8569d4420cdbf1bb391225d5171ef72a0d0ecf028467 as build-env
1+
FROM registry.redhat.io/ubi9/go-toolset:1.24@sha256:6fd64cd7f38a9b87440f963b6c04953d04de65c35b9672dbd7f1805b0ae20d09 as build-env
2+
ENV GOEXPERIMENT=strictfipsruntime
3+
ENV CGO_ENABLED=1
24
ENV APP_ROOT=/opt/app-root
35
ENV GOPATH=$APP_ROOT
46
WORKDIR $APP_ROOT/src/

Dockerfile.tsa.rh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:96cfceb50f5323efa1aa8569d4420cdbf1bb391225d5171ef72a0d0ecf028467 as builder
15+
FROM registry.redhat.io/ubi9/go-toolset:1.24@sha256:6fd64cd7f38a9b87440f963b6c04953d04de65c35b9672dbd7f1805b0ae20d09 AS builder
16+
ENV GOEXPERIMENT=strictfipsruntime
17+
ENV CGO_ENABLED=1
1618
ENV APP_ROOT=/opt/app-root
1719
ENV GOPATH=$APP_ROOT
1820

@@ -24,17 +26,17 @@ ADD ./pkg/ $APP_ROOT/src/pkg/
2426

2527
RUN git config --global --add safe.directory /opt/app-root/src && \
2628
go mod download && \
27-
CGO_ENABLED=0 go build -mod=readonly -ldflags "${SERVER_LDFLAGS}" ./cmd/timestamp-server
29+
go build -mod=readonly -ldflags "${SERVER_LDFLAGS}" ./cmd/timestamp-server
2830

2931
# debug compile options & debugger
30-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:96cfceb50f5323efa1aa8569d4420cdbf1bb391225d5171ef72a0d0ecf028467 as debug
32+
FROM registry.redhat.io/ubi9/go-toolset:1.24@sha256:6fd64cd7f38a9b87440f963b6c04953d04de65c35b9672dbd7f1805b0ae20d09 AS debug
3133
RUN go install github.com/go-delve/delve/cmd/dlv@v1.9.0
3234

3335
# overwrite server and include debugger
3436
COPY --from=builder /opt/app-root/src/timestamp-server_debug /usr/local/bin/timestamp-server
3537

3638
# Multi-Stage production build
37-
FROM registry.access.redhat.com/ubi9-minimal@sha256:6d5a6576c83816edcc0da7ed62ba69df8f6ad3cbe659adde2891bfbec4dbf187 as deploy
39+
FROM registry.access.redhat.com/ubi9-minimal@sha256:6d5a6576c83816edcc0da7ed62ba69df8f6ad3cbe659adde2891bfbec4dbf187 AS deploy
3840

3941
LABEL description="The timestamp-authority is a process that provides a timestamp record of when a document was created or modified."
4042
LABEL io.k8s.description="The timestamp-authority is a process that provides a timestamp record of when a document was created or modified."
@@ -51,4 +53,4 @@ COPY LICENSE /licenses/license.txt
5153
USER 65532:65532
5254

5355
# Set the binary as the entrypoint of the container
54-
CMD ["timestamp-server", "serve"]
56+
CMD ["timestamp-server", "serve"]

0 commit comments

Comments
 (0)