diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fabb0a3..5a7989ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -376,12 +376,7 @@ jobs: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - # pinning this to 1.20.5 because this issue in go-testcontainers occurs - # in 1.20.6 with the error "http: invalid Host header, host port waiting failed" - # https://github.com/testcontainers/testcontainers-go/issues/1359 - # remove setting this when the above issue is fixed so that the job will - # just get the go version from .go-version. - go-version: 1.20.5 + go-version: ${{ needs.get-go-version.outputs.go-version }} - id: run-tests run: cd integration-tests && go test -v -output-dir=./output -dataplane-image=hashicorppreview/${{env.repo}}:${{env.dev_tag}}-${{github.sha}} -server-image=${{matrix.server.image}} -server-version=${{matrix.server.version}} continue-on-error: true diff --git a/.github/workflows/consul-dataplane-checks.yaml b/.github/workflows/consul-dataplane-checks.yaml index 91f60268..c7507795 100644 --- a/.github/workflows/consul-dataplane-checks.yaml +++ b/.github/workflows/consul-dataplane-checks.yaml @@ -42,12 +42,7 @@ jobs: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 with: - # pinning this to 1.20.5 because this issue in go-testcontainers occurs - # in 1.20.6 with the error "http: invalid Host header, host port waiting failed" - # https://github.com/testcontainers/testcontainers-go/issues/1359 - # remove setting this when the above issue is fixed so that the job will - # just get the go version from .go-version. - go-version: 1.20.5 + go-version: ${{ needs.get-go-version.outputs.go-version }} - run: make docker # Currently the server version below is set to 1.15-dev: integration-tests/main_test.go - run: echo "VERSION=$(make version)" >> $GITHUB_ENV diff --git a/Dockerfile b/Dockerfile index 5ee69921..7dffff31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ FROM debian:bullseye-slim AS setcap-envoy-fips-binary ARG BIN_NAME=consul-dataplane ARG TARGETARCH ARG TARGETOS +ARG GOLANG_VERSION COPY --from=envoy-fips-binary /usr/local/bin/envoy /usr/local/bin/ COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /usr/local/bin/ @@ -43,7 +44,7 @@ RUN setcap CAP_NET_BIND_SERVICE=+ep /usr/local/bin/$BIN_NAME # go-discover builds the discover binary (which we don't currently publish # either). -FROM golang:1.20.12-alpine as go-discover +FROM golang:${GOLANG_VERSION}-alpine as go-discover RUN CGO_ENABLED=0 go install github.com/hashicorp/go-discover/cmd/discover@214571b6a5309addf3db7775f4ee8cf4d264fd5f # Pull in dumb-init from alpine, as our distroless release image doesn't have a diff --git a/Makefile b/Makefile index 800cf2af..b166eeea 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ REVISION = $(shell git rev-parse HEAD) # Docker Stuff. export DOCKER_BUILDKIT=1 -BUILD_ARGS = BIN_NAME=$(BIN_NAME) PRODUCT_VERSION=$(VERSION) PRODUCT_REVISION=$(REVISION) +BUILD_ARGS = BIN_NAME=$(BIN_NAME) PRODUCT_VERSION=$(VERSION) PRODUCT_REVISION=$(REVISION) GOLANG_VERSION=$(GOLANG_VERSION) TAG = $(PRODUCT_NAME):$(VERSION) BA_FLAGS = $(addprefix --build-arg=,$(BUILD_ARGS)) FLAGS = --target $(TARGET) --platform $(PLATFORM) --tag $(TAG) $(BA_FLAGS)