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/circleci-tailscale@2.1.0
-
Goto the Tailscale Admin Console and create a new
Auth Key. SelectEphemeral Key -
Create an environment variable in your project:
TAILSCALE_AUTH_KEYand 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
socks5his 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/circleci-tailscale@2.1.0
jobs:
build:
docker:
- image: circleci/node:fermium-stretch
parameters:
tailscale-auth-key:
type: env_var_name
default: TAILSCALE_AUTH_KEY
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-version | Tailscale version to use. | 1.20.4 |