Skip to content

Commit b72b108

Browse files
authored
ci: build gotip into boulder-tools (#8801)
This installs `gotip` alongside the numbered $GO_VERSION. When running tests with BOULDER_CONFIG_DIR=test/config-next, startservers.py now invokes: make GO=gotip This commit also changes our Makefile to accomodate overriding the name of the Go binary. The `boulder-mtca` subcommand, `mtca` package, and `genmtpki` package are all gated on the [build constraint] go1.27, which is satisfied when running under gotip as of the time of writing. These packages don't yet add support for mldsa keys, which will come in a followup PR. Alternatives considered: I considered having tag_and_upload treat `gotip` as a special token and build a separate container with `gotip` in it. This wound up messy for various reasons. Probably the chief reason not to do it is that it explodes our CI matrix further. By deciding that we use gotip exactly when BOULDER_CONFIG_DIR=test/config-next, we can keep the matrix somewhat under control. Fixes #8787 [build constraint]: https://pkg.go.dev/cmd/go#hdr-Build_constraints
1 parent 664bc74 commit b72b108

11 files changed

Lines changed: 47 additions & 61 deletions

File tree

.github/workflows/boulder-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
matrix:
3737
# Add additional docker image tags here and all tests will be run with the additional image.
3838
BOULDER_TOOLS_TAG:
39-
- go1.26.3_2026-05-22
39+
- go1.26.3_2026-06-15
4040
# Tests command definitions. Use the entire "docker compose" command you want to run.
4141
tests:
4242
# Run ./test.sh --help for a description of each of the flags.

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ VERSION ?= 1.0.0
77
EPOCH ?= 1
88
MAINTAINER ?= "Community"
99

10+
GO ?= go
11+
1012
# TODO(#8410): Remove pardot-test-srv when we've fully migrated to
1113
# salesforce-test-srv.
1214
CMDS = admin boulder ceremony ct-test-srv salesforce-test-srv pardot-test-srv chall-test-srv zendesk-test-srv
@@ -44,7 +46,7 @@ bin/pardot-test-srv: bin/salesforce-test-srv
4446

4547
build_cmds: | $(OBJDIR)
4648
echo $(OBJECTS)
47-
GOBIN=$(OBJDIR) go install -mod=vendor $(GO_BUILD_FLAGS) ./...
49+
GOBIN=$(OBJDIR) $(GO) install -mod=vendor $(GO_BUILD_FLAGS) ./...
4850

4951
# Building a .deb requires `fpm` from https://github.com/jordansissel/fpm
5052
# which you can install with `gem install fpm`.

cmd/boulder-mtca/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build go1.27
2+
13
package notmain
24

35
import (

cmd/boulder/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77

88
_ "github.com/letsencrypt/boulder/cmd/bad-key-revoker"
99
_ "github.com/letsencrypt/boulder/cmd/boulder-ca"
10-
_ "github.com/letsencrypt/boulder/cmd/boulder-mtca"
11-
_ "github.com/letsencrypt/boulder/cmd/boulder-mtpublisher"
1210
_ "github.com/letsencrypt/boulder/cmd/boulder-observer"
1311
_ "github.com/letsencrypt/boulder/cmd/boulder-publisher"
1412
_ "github.com/letsencrypt/boulder/cmd/boulder-ra"

cmd/boulder/main_next.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//go:build go1.27
2+
3+
package main
4+
5+
import (
6+
_ "github.com/letsencrypt/boulder/cmd/boulder-mtca"
7+
_ "github.com/letsencrypt/boulder/cmd/boulder-mtpublisher"
8+
)

mtca/mtca.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build go1.27
2+
13
package mtca
24

35
import (

test/boulder-tools/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ ENV PATH=/usr/local/go/bin:/usr/local/protoc/bin:$PATH
1010
ENV GOBIN=/usr/local/bin/
1111
RUN curl "https://dl.google.com/go/go${GO_VERSION}.$(echo $TARGETPLATFORM | sed 's|\/|-|').tar.gz" |\
1212
tar -C /usr/local -xz
13+
# Regardless of GO_VERSION, also install gotip from the latest main.
14+
# This is temporary until Go 1.27 is released, to give us access to the
15+
# crypto/mldsa package. See startservers.py and test/certs/generate.sh
16+
# for uses of gotip.
17+
RUN /usr/local/go/bin/go install golang.org/dl/gotip@latest
18+
RUN gotip download
1319
RUN go install github.com/rubenv/sql-migrate/sql-migrate@v1.1.2
1420
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.5
1521
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
@@ -46,6 +52,8 @@ RUN sed -i '/$RepeatedMsgReduction on/s/^/#/' /etc/rsyslog.conf
4652

4753
COPY --from=godeps /usr/local/bin/* /usr/local/bin/
4854
COPY --from=godeps /usr/local/go/ /usr/local/go/
55+
# Downloaded packages from gotip
56+
COPY --from=godeps /root/sdk/ /root/sdk/
4957
COPY --from=rustdeps /usr/local/cargo/bin/typos /usr/local/bin/typos
5058

5159
ENV PATH=/usr/local/go/bin:/usr/local/protoc/bin:$PATH

test/certs/generate.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ ipki() (
6161
webpki() (
6262
# Because it invokes the ceremony tool, webpki.go expects to be invoked with
6363
# the root of the boulder repo as the current working directory.
64-
# This function executes in a subshell, so this cd does not affect the parent
65-
# script.
66-
make build
64+
GOBIN=$PWD/bin/ go install ./cmd/ceremony
6765
mkdir -p ./test/certs/webpki
6866
go run ./test/certs/webpki.go
6967
)
@@ -81,5 +79,5 @@ fi
8179
if ! [ -d test/certs/mtpki ]; then
8280
echo "Generating mtpki/..."
8381
mkdir -p test/certs/mtpki
84-
go run ./test/certs/genmtpki/genmtpki.go
82+
gotip run ./test/certs/genmtpki/genmtpki.go
8583
fi

test/certs/genmtpki/genmtpki.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build go1.27
2+
13
package main
24

35
import (

test/config/mtca.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)