Orb: https://circleci.com/developer/orbs/orb/threecomma/circleci-tailscale
Use CircleCI version 2.1 at the top of your .circleci/config.yml
file.
version: 2.1
If you do not already have Pipelines enabled, you'll need to go to Project Settings -> Advanced Settings and turn it on.
Add the orbs stanza below your version, invoking the orb:
orbs:
circleci-tailscale: threecomma/[email protected]
-
Goto the Tailscale Admin Console and create a new
Auth Key
. SelectEphemeral Key
-
Create an environment variable in your project:
TAILSCALE_AUTH_KEY
and paste the new key you created. -
The orb automatically exposes environment variables:
[http_proxy,https_proxy,ALL_PROXY,HTTP_PROXY,HTTPS_PROXY]
that populates tosocks5h://localhost:1055/
.
This makes it compatible with various applications like curl
that respect these environment variables to proxy through a socks5 proxy.
The reason we use
socks5h
is to force DNS resolution through the socks5 proxy that is setup with Tailscale.
Here is a sample .circleci/config.yml
If you would like to change the tailscale version you can set the parameter tailscale-version
.
version: 2.1
orbs:
circleci-tailscale: threecomma/[email protected]
jobs:
build:
docker:
- image: circleci/node:fermium-stretch
parameters:
tailscale-auth-key:
type: env_var_name
default: TAILSCALE_AUTH_KEY
tailscale-proxy-address:
type: string
default: localhost
steps:
- checkout
- circleci-tailscale/connect
- run:
name: curl a tailscale machine over port 8080
command: |
until curl "http://[machine].[namespace].beta.tailscale.net:8080/"
do
sleep 1
done
Parameter | Description | Default Value |
---|---|---|
tailscale-auth-key | Your Tailscale authentication key, from the admin panel. | |
tailscale-proxy-address | Proxy address where tailscale should listen. | localhost |
tailscale-version | Tailscale version to use. | 1.20.4 |