Skip to content

Commit 2344bdf

Browse files
committed
add derp and derpprobe images
1 parent 3a006b1 commit 2344bdf

2 files changed

Lines changed: 51 additions & 1 deletion

File tree

‎.github/workflows/build-and-publish-images.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,18 @@ jobs:
4242
TAGS: ${{ github.ref_name }}
4343
run: |
4444
echo "Building and publishing tailscale client to ${REPO} with tags ${TAGS}"
45-
TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=client ./build_docker.sh
45+
TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=client ./build_docker.sh
46+
- name: Build and publish derper image
47+
env:
48+
REPO: ghcr.io/${{ github.repository_owner }}/derper
49+
TAGS: ${{ github.ref_name }}
50+
run: |
51+
echo "Building and publishing derper to ${REPO} with tags ${TAGS}"
52+
TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=derper ./build_docker.sh
53+
- name: Build and publish derpprobe image
54+
env:
55+
REPO: ghcr.io/${{ github.repository_owner }}/derpprobe
56+
TAGS: ${{ github.ref_name }}
57+
run: |
58+
echo "Building and publishing derpprobe to ${REPO} with tags ${TAGS}"
59+
TAGS="${TAGS}" REPOS=${REPO} PLATFORM=${PLATFORM} PUSH=true TARGET=derpprobe ./build_docker.sh

‎build_docker.sh‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,42 @@ case "$TARGET" in
148148
--files="${FILES}" \
149149
/usr/local/bin/k8s-proxy
150150
;;
151+
derper)
152+
DEFAULT_REPOS="tailscale/derper"
153+
REPOS="${REPOS:-${DEFAULT_REPOS}}"
154+
go run github.com/tailscale/mkctr \
155+
--gopaths="tailscale.com/cmd/derper:/usr/local/bin/derper" \
156+
--ldflags=" \
157+
-X tailscale.com/version.longStamp=${VERSION_LONG} \
158+
-X tailscale.com/version.shortStamp=${VERSION_SHORT} \
159+
-X tailscale.com/version.gitCommitStamp=${VERSION_GIT_HASH}" \
160+
--base="${BASE}" \
161+
--tags="${TAGS}" \
162+
--gotags="ts_package_container" \
163+
--repos="${REPOS}" \
164+
--push="${PUSH}" \
165+
--target="${PLATFORM}" \
166+
--annotations="${ANNOTATIONS}" \
167+
/usr/local/bin/derper
168+
;;
169+
derpprobe)
170+
DEFAULT_REPOS="tailscale/derpprobe"
171+
REPOS="${REPOS:-${DEFAULT_REPOS}}"
172+
go run github.com/tailscale/mkctr \
173+
--gopaths="tailscale.com/cmd/derpprobe:/usr/local/bin/derpprobe" \
174+
--ldflags=" \
175+
-X tailscale.com/version.longStamp=${VERSION_LONG} \
176+
-X tailscale.com/version.shortStamp=${VERSION_SHORT} \
177+
-X tailscale.com/version.gitCommitStamp=${VERSION_GIT_HASH}" \
178+
--base="${BASE}" \
179+
--tags="${TAGS}" \
180+
--gotags="ts_package_container" \
181+
--repos="${REPOS}" \
182+
--push="${PUSH}" \
183+
--target="${PLATFORM}" \
184+
--annotations="${ANNOTATIONS}" \
185+
/usr/local/bin/derpprobe
186+
;;
151187
*)
152188
echo "unknown target: $TARGET"
153189
exit 1

0 commit comments

Comments
 (0)