Skip to content

Commit

Permalink
go1.22.2 build image
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Apr 3, 2024
1 parent a77dadf commit 9403dd6
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defaultEnv:
&defaultEnv
docker:
# specify the version
- image: docker.io/fortio/fortio.build:v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e
- image: docker.io/fortio/fortio.build:v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e
working_directory: /build/fortio

jobs:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the binaries in larger image
FROM docker.io/fortio/fortio.build:v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e as build
FROM docker.io/fortio/fortio.build:v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e as build
WORKDIR /build
COPY --chown=build:build . fortio
ARG MODE=install
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dependencies and linters for build:
FROM golang:1.21.8@sha256:c82d4ad02c062cf2b393bf0374df26638c6fed3dfe52cdbd3635d4a7befab86e
FROM golang:1.22.2@sha256:c4fb952e712efd8f787bcd8e53fd66d1d83b7dc26adabc218e9eac1dbf776bdf
# Need gcc for -race test (and some linters though those work with CGO_ENABLED=0)
RUN apt-get -y update && \
apt-get --no-install-recommends -y upgrade && \
Expand All @@ -24,7 +24,7 @@ RUN set -x; if [ x"$(dpkg --print-architecture)" != x"s390x" ]; then \
# govulncheck
RUN go install golang.org/x/vuln/cmd/govulncheck@latest
WORKDIR /build
COPY .golangci.yml .
ADD https://raw.githubusercontent.com/fortio/workflows/main/golangci.yml .golangci.yml
VOLUME /build
RUN useradd -m build -d /build
RUN chown -R build:build /build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.echosrv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the binaries in larger image
FROM docker.io/fortio/fortio.build:v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e as build
FROM docker.io/fortio/fortio.build:v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e as build
WORKDIR /build
COPY . fortio
RUN make -C fortio official-build-version BUILD_DIR=/build OFFICIAL_TARGET=fortio.org/fortio/echosrv
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.fcurl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the binaries in larger image
FROM docker.io/fortio/fortio.build:v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e as build
FROM docker.io/fortio/fortio.build:v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e as build
WORKDIR /build
COPY . fortio
RUN make -C fortio official-build-version BUILD_DIR=/build OFFICIAL_TARGET=fortio.org/fortio/fcurl
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
IMAGES=echosrv fcurl # plus the combo image / Dockerfile without ext.

DOCKER_PREFIX := docker.io/fortio/fortio
BUILD_IMAGE_TAG := v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e
BUILD_IMAGE_TAG := v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e
BUILDX_PLATFORMS := linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
BUILDX_POSTFIX :=
ifeq '$(shell echo $(BUILDX_PLATFORMS) | awk -F "," "{print NF-1}")' '0'
Expand Down Expand Up @@ -68,7 +68,7 @@ local-lint: .golangci.yml
LINT_PACKAGES:=./...
lint: .golangci.yml
docker run -v $(CURDIR):/build/fortio $(BUILD_IMAGE) bash -c \
"cd /build/fortio \
"cd /build/fortio; chown build:build . \
&& time make local-lint DEBUG_LINTERS=\"$(DEBUG_LINTERS)\" LINT_PACKAGES=\"$(LINT_PACKAGES)\""

docker-test:
Expand Down
2 changes: 1 addition & 1 deletion Webtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fi
PPROF_URL="$BASE_URL/debug/pprof/heap?debug=1"
$CURL "$PPROF_URL" | grep -i TotalAlloc # should find this in memory profile
# creating dummy container to hold a volume for test certs due to remote docker bind mount limitation.
DOCKERCURLID=$(docker run -d -v $TEST_CERT_VOL --net host --name $DOCKERSECVOLNAME docker.io/fortio/fortio.build:v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e sleep 120)
DOCKERCURLID=$(docker run -d -v $TEST_CERT_VOL --net host --name $DOCKERSECVOLNAME docker.io/fortio/fortio.build:v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e sleep 120)
# while we have something with actual curl binary do
# Test for h2c upgrade (#562)
docker exec $DOCKERSECVOLNAME /usr/bin/curl -v --http2 -m 10 -d foo42 http://localhost:8080/debug | tee >(cat 1>&2) | grep foo42
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module fortio.org/fortio

go 1.19 // As a library the current version of fortio works with 1.18 (first version with generics) but tests use 1.19 features
// As a library the current version of fortio works with 1.18 (first version with generics) but tests use 1.19 features
// Note we will switch soon to 1.22 for the linters
go 1.19

// toolchain go1.22.2 // this shouldn't be necessary - see https://github.com/golang/go/issues/66175#issuecomment-2010343876

require (
fortio.org/assert v1.2.1
Expand Down
2 changes: 1 addition & 1 deletion release/Dockerfile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Concatenated after ../Dockerfile to create the tgz
FROM docker.io/fortio/fortio.build:v69@sha256:c21ecd49fd232a4c184a04607f339c18d13151480aee779a047358f2f23e287e as stage
FROM docker.io/fortio/fortio.build:v70@sha256:a1a0c03170d4be21a94d62b7e0b5dd966135e8888e8b2bf97eb8511eb6ee778e as stage
ARG archs="amd64 arm64 ppc64le s390x"
ENV archs=${archs}
# Build image defaults to build user, switch back to root for
Expand Down

0 comments on commit 9403dd6

Please sign in to comment.