feat: build talosctl for FreeBSD
This PR adds support for building talosctl for FreeBSD on amd64 and arm64 architectures. It also pulls in the latest go-blockdevice library to ensure the FreeBSD stubs are there for proper build. Signed-off-by: Spencer Smith <spencer.smith@talos-systems.com>
This commit is contained in:
parent
616da30695
commit
c92c90655a
@ -193,7 +193,7 @@ local Pipeline(name, steps=[], depends_on=[], with_docker=true, disable_clone=fa
|
||||
|
||||
local generate = Step("generate", target="generate docs", depends_on=[setup_ci]);
|
||||
local check_dirty = Step("check-dirty", depends_on=[generate]);
|
||||
local build = Step("build", target="talosctl-linux talosctl-darwin talosctl-windows kernel initramfs installer imager talos", depends_on=[check_dirty], environment={"IMAGE_REGISTRY": local_registry, "PUSH": true});
|
||||
local build = Step("build", target="talosctl-linux talosctl-darwin talosctl-freebsd talosctl-windows kernel initramfs installer imager talos", depends_on=[check_dirty], environment={"IMAGE_REGISTRY": local_registry, "PUSH": true});
|
||||
local lint = Step("lint", depends_on=[build]);
|
||||
local talosctl_cni_bundle = Step('talosctl-cni-bundle', depends_on=[build, lint]);
|
||||
local iso = Step("iso", target="iso", depends_on=[build], environment={"IMAGE_REGISTRY": local_registry});
|
||||
@ -589,6 +589,8 @@ local release = {
|
||||
'_out/talosctl-cni-bundle-arm64.tar.gz',
|
||||
'_out/talosctl-darwin-amd64',
|
||||
'_out/talosctl-darwin-arm64',
|
||||
'_out/talosctl-freebsd-amd64',
|
||||
'_out/talosctl-freebsd-arm64',
|
||||
'_out/talosctl-linux-amd64',
|
||||
'_out/talosctl-linux-arm64',
|
||||
'_out/talosctl-linux-armv7',
|
||||
|
17
Dockerfile
17
Dockerfile
@ -386,6 +386,23 @@ RUN --mount=type=cache,target=/.cache GOOS=windows GOARCH=amd64 GOAMD64=${GOAMD6
|
||||
FROM scratch AS talosctl-windows
|
||||
COPY --from=talosctl-windows-amd64-build /talosctl-windows-amd64.exe /talosctl-windows-amd64.exe
|
||||
|
||||
FROM base AS talosctl-freebsd-amd64-build
|
||||
WORKDIR /src/cmd/talosctl
|
||||
ARG GO_BUILDFLAGS
|
||||
ARG GO_LDFLAGS
|
||||
ARG GOAMD64
|
||||
RUN --mount=type=cache,target=/.cache GOOS=freebsd GOARCH=amd64 GOAMD64=${GOAMD64} go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /talosctl-freebsd-amd64
|
||||
|
||||
FROM base AS talosctl-freebsd-arm64-build
|
||||
WORKDIR /src/cmd/talosctl
|
||||
ARG GO_BUILDFLAGS
|
||||
ARG GO_LDFLAGS
|
||||
RUN --mount=type=cache,target=/.cache GOOS=freebsd GOARCH=arm64 go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /talosctl-freebsd-arm64
|
||||
|
||||
FROM scratch AS talosctl-freebsd
|
||||
COPY --from=talosctl-freebsd-amd64-build /talosctl-freebsd-amd64 /talosctl-freebsd-amd64
|
||||
COPY --from=talosctl-freebsd-arm64-build /talosctl-freebsd-arm64 /talosctl-freebsd-arm64
|
||||
|
||||
# The kernel target is the linux kernel.
|
||||
|
||||
FROM scratch AS kernel
|
||||
|
4
go.mod
4
go.mod
@ -46,7 +46,6 @@ require (
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/emicklei/dot v1.0.0
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible
|
||||
github.com/fatih/color v1.13.0
|
||||
github.com/fsnotify/fsnotify v1.5.4
|
||||
github.com/gdamore/tcell/v2 v2.5.1
|
||||
@ -93,7 +92,7 @@ require (
|
||||
github.com/talos-systems/crypto v0.3.6-0.20220622130438-e9df1b8ca74c
|
||||
github.com/talos-systems/discovery-api v0.1.0
|
||||
github.com/talos-systems/discovery-client v0.1.0
|
||||
github.com/talos-systems/go-blockdevice v0.3.3
|
||||
github.com/talos-systems/go-blockdevice v0.3.4
|
||||
github.com/talos-systems/go-cmd v0.1.0
|
||||
github.com/talos-systems/go-debug v0.2.1
|
||||
github.com/talos-systems/go-kmsg v0.1.1
|
||||
@ -168,6 +167,7 @@ require (
|
||||
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
|
||||
github.com/docker/go-units v0.4.0 // indirect
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
|
||||
github.com/gdamore/encoding v1.0.0 // indirect
|
||||
|
4
go.sum
4
go.sum
@ -1149,8 +1149,8 @@ github.com/talos-systems/discovery-api v0.1.0 h1:aKod6uqakH6VfeQ6HaxPF7obqFAL1QT
|
||||
github.com/talos-systems/discovery-api v0.1.0/go.mod h1:ZsbzzOC5bzToaF3+YvUXDf9paeWV5bedpDu5RPXrglM=
|
||||
github.com/talos-systems/discovery-client v0.1.0 h1:m+f96TKGFckMWrhDI+o9+QhcGn8f1A61Jp6YYVwiulI=
|
||||
github.com/talos-systems/discovery-client v0.1.0/go.mod h1:LxqCv16VBB68MgaMnV8jXujYd3Q097DAn22U5gaHmkU=
|
||||
github.com/talos-systems/go-blockdevice v0.3.3 h1:40shLXYSqooYTQd5sG8L+usUKKAw87vRocl2Arb3G3k=
|
||||
github.com/talos-systems/go-blockdevice v0.3.3/go.mod h1:qnn/zDc09I1DA2BUDDCOSA2D0P8pIDjN8pGiRoRaQig=
|
||||
github.com/talos-systems/go-blockdevice v0.3.4 h1:LP2hgIcd5qbympxYFlWbHYTPyD/f/sZjBMma01soniQ=
|
||||
github.com/talos-systems/go-blockdevice v0.3.4/go.mod h1:qnn/zDc09I1DA2BUDDCOSA2D0P8pIDjN8pGiRoRaQig=
|
||||
github.com/talos-systems/go-cmd v0.0.0-20210216164758-68eb0067e0f0/go.mod h1:kf+rZzTEmlDiYQ6ulslvRONnKLQH8x83TowltGMhO+k=
|
||||
github.com/talos-systems/go-cmd v0.1.0 h1:bqPeL0ksproFyTOlvMisdUXc7uAf0aqJ5Q6waSGv32s=
|
||||
github.com/talos-systems/go-cmd v0.1.0/go.mod h1:kf+rZzTEmlDiYQ6ulslvRONnKLQH8x83TowltGMhO+k=
|
||||
|
Loading…
x
Reference in New Issue
Block a user