@@ -22,7 +22,8 @@ updatedeps: ## Update depaware deps
2222 tailscale.com/cmd/tailscale \
2323 tailscale.com/cmd/derper \
2424 tailscale.com/cmd/k8s-operator \
25- tailscale.com/cmd/stund
25+ tailscale.com/cmd/stund \
26+ tailscale.com/cmd/tsidp
2627 PATH=" $$ (./tool/go env GOROOT)/bin:$$ PATH" ./tool/go run github.com/tailscale/depaware --update -goos=linux,darwin,windows,android,ios --internal \
2728 tailscale.com/tsnet
2829
@@ -34,7 +35,8 @@ depaware: ## Run depaware checks
3435 tailscale.com/cmd/tailscale \
3536 tailscale.com/cmd/derper \
3637 tailscale.com/cmd/k8s-operator \
37- tailscale.com/cmd/stund
38+ tailscale.com/cmd/stund \
39+ tailscale.com/cmd/tsidp
3840 PATH=" $$ (./tool/go env GOROOT)/bin:$$ PATH" ./tool/go run github.com/tailscale/depaware --check --goos=linux,darwin,windows,android,ios --internal \
3941 tailscale.com/tsnet
4042
@@ -62,7 +64,7 @@ buildmultiarchimage: ## Build (and optionally push) multiarch docker image
6264check : staticcheck vet depaware buildwindows build386 buildlinuxarm buildwasm # # Perform basic checks and compilation tests
6365
6466staticcheck : # # Run staticcheck.io checks
65- ./tool/go run honnef.co/go/tools/cmd/staticcheck -- $$(./tool/go list ./... | grep -v tempfork )
67+ ./tool/go run honnef.co/go/tools/cmd/staticcheck -- $$(./tool/go run ./tool/listpkgs --ignore-3p ./... )
6668
6769kube-generate-all : kube-generate-deepcopy # # Refresh generated files for Tailscale Kubernetes Operator
6870 ./tool/go generate ./cmd/k8s-operator
@@ -90,34 +92,42 @@ pushspk: spk ## Push and install synology package on ${SYNO_HOST} host
9092 scp tailscale.spk root@${SYNO_HOST} :
9193 ssh root@${SYNO_HOST} /usr/syno/bin/synopkg install tailscale.spk
9294
93- publishdevimage : # # Build and publish tailscale image to location specified by ${REPO}
94- @test -n " ${REPO} " || (echo " REPO=... required; e.g. REPO=ghcr.io/${USER} /tailscale" && exit 1)
95- @test " ${REPO} " ! = " tailscale/tailscale" || (echo " REPO=... must not be tailscale/tailscale" && exit 1)
96- @test " ${REPO} " ! = " ghcr.io/tailscale/tailscale" || (echo " REPO=... must not be ghcr.io/tailscale/tailscale" && exit 1)
97- @test " ${REPO} " ! = " tailscale/k8s-operator" || (echo " REPO=... must not be tailscale/k8s-operator" && exit 1)
98- @test " ${REPO} " ! = " ghcr.io/tailscale/k8s-operator" || (echo " REPO=... must not be ghcr.io/tailscale/k8s-operator" && exit 1)
95+ .PHONY : check-image-repo
96+ check-image-repo :
97+ @if [ -z " $( REPO) " ]; then \
98+ echo " REPO=... required; e.g. REPO=ghcr.io/$$ USER/tailscale" >&2 ; \
99+ exit 1; \
100+ fi
101+ @for repo in tailscale/tailscale ghcr.io/tailscale/tailscale \
102+ tailscale/k8s-operator ghcr.io/tailscale/k8s-operator \
103+ tailscale/k8s-nameserver ghcr.io/tailscale/k8s-nameserver \
104+ tailscale/tsidp ghcr.io/tailscale/tsidp \
105+ tailscale/k8s-proxy ghcr.io/tailscale/k8s-proxy; do \
106+ if [ " $( REPO) " = " $$ repo" ]; then \
107+ echo " REPO=... must not be $$ repo" >&2 ; \
108+ exit 1; \
109+ fi ; \
110+ done
111+
112+ publishdevimage : check-image-repo # # Build and publish tailscale image to location specified by ${REPO}
99113 TAGS=" ${TAGS} " REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=client ./build_docker.sh
100114
101- publishdevoperator : # # Build and publish k8s-operator image to location specified by ${REPO}
102- @test -n " ${REPO} " || (echo " REPO=... required; e.g. REPO=ghcr.io/${USER} /tailscale" && exit 1)
103- @test " ${REPO} " ! = " tailscale/tailscale" || (echo " REPO=... must not be tailscale/tailscale" && exit 1)
104- @test " ${REPO} " ! = " ghcr.io/tailscale/tailscale" || (echo " REPO=... must not be ghcr.io/tailscale/tailscale" && exit 1)
105- @test " ${REPO} " ! = " tailscale/k8s-operator" || (echo " REPO=... must not be tailscale/k8s-operator" && exit 1)
106- @test " ${REPO} " ! = " ghcr.io/tailscale/k8s-operator" || (echo " REPO=... must not be ghcr.io/tailscale/k8s-operator" && exit 1)
115+ publishdevoperator : check-image-repo # # Build and publish k8s-operator image to location specified by ${REPO}
107116 TAGS=" ${TAGS} " REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=k8s-operator ./build_docker.sh
108117
109- publishdevnameserver : # # Build and publish k8s-nameserver image to location specified by ${REPO}
110- @test -n " ${REPO} " || (echo " REPO=... required; e.g. REPO=ghcr.io/${USER} /tailscale" && exit 1)
111- @test " ${REPO} " ! = " tailscale/tailscale" || (echo " REPO=... must not be tailscale/tailscale" && exit 1)
112- @test " ${REPO} " ! = " ghcr.io/tailscale/tailscale" || (echo " REPO=... must not be ghcr.io/tailscale/tailscale" && exit 1)
113- @test " ${REPO} " ! = " tailscale/k8s-nameserver" || (echo " REPO=... must not be tailscale/k8s-nameserver" && exit 1)
114- @test " ${REPO} " ! = " ghcr.io/tailscale/k8s-nameserver" || (echo " REPO=... must not be ghcr.io/tailscale/k8s-nameserver" && exit 1)
118+ publishdevnameserver : check-image-repo # # Build and publish k8s-nameserver image to location specified by ${REPO}
115119 TAGS=" ${TAGS} " REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=k8s-nameserver ./build_docker.sh
116120
121+ publishdevtsidp : check-image-repo # # Build and publish tsidp image to location specified by ${REPO}
122+ TAGS=" ${TAGS} " REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=tsidp ./build_docker.sh
123+
124+ publishdevproxy : check-image-repo # # Build and publish k8s-proxy image to location specified by ${REPO}
125+ TAGS=" ${TAGS} " REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=k8s-proxy ./build_docker.sh
126+
117127.PHONY : sshintegrationtest
118128sshintegrationtest : # # Run the SSH integration tests in various Docker containers
119- @GOOS=linux GOARCH=amd64 ./tool/go test -tags integrationtest -c ./ssh/tailssh -o ssh/tailssh/testcontainers/tailssh.test && \
120- GOOS=linux GOARCH=amd64 ./tool/go build -o ssh/tailssh/testcontainers/tailscaled ./cmd/tailscaled && \
129+ @GOOS=linux GOARCH=amd64 CGO_ENABLED=0 ./tool/go test -tags integrationtest -c ./ssh/tailssh -o ssh/tailssh/testcontainers/tailssh.test && \
130+ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 ./tool/go build -o ssh/tailssh/testcontainers/tailscaled ./cmd/tailscaled && \
121131 echo " Testing on ubuntu:focal" && docker build --build-arg=" BASE=ubuntu:focal" -t ssh-ubuntu-focal ssh/tailssh/testcontainers && \
122132 echo " Testing on ubuntu:jammy" && docker build --build-arg=" BASE=ubuntu:jammy" -t ssh-ubuntu-jammy ssh/tailssh/testcontainers && \
123133 echo " Testing on ubuntu:noble" && docker build --build-arg=" BASE=ubuntu:noble" -t ssh-ubuntu-noble ssh/tailssh/testcontainers && \
0 commit comments