logo

CircleCI

Namespace integrates with CircleCI's OIDC provider to allow easy access to a Namespace workspace from CircleCI jobs.

Federation with CircleCI is available as an early access feature. Please reach out to support@namespace.so to get enrolled.

Enable using Namespace from Circle CI

Associate your Circle CI organization with Namespace

Find your CircleCI organization ID in Organization Settings > Overview, and email support@namespace.so with both your Organization ID and your Namespace workspace.

Set up access to Namespace.

In order to obtain credentials to call Namespace, you'll need the nsc CLI to obtain those credentials.

Add the following step to your job:

- run:
    name: Install latest nsc and set up access to Namespace
    command: |
      curl -H 'CI: true' -fsSL https://get.namespace.so/cloud/install.sh | NS_ROOT=/tmp/nsc sh
      echo 'export PATH="/tmp/nsc/bin:$PATH"' >> "$BASH_ENV" && source "$BASH_ENV"
 
      nsc auth exchange-circleci-token

The Namespace team will release a Circle CI Orb in the future to simplify these steps.

And you're done, you can now call issue any other Namespace calls.

Using Remote Builders from Circle CI

Make sure you follow the steps above first.

Update Docker's buildx used in your workflow

CircleCI runners by default include buildx version v0.8.1 which does not support remote builders.

To update buildx, add the following step to your job. Make sure to select the correct architecture matching your runner.

- run:
    name: update buildx
    command: |
      mkdir -p ~/.docker/cli-plugins
      wget -O ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.10.4/buildx-v0.10.4.linux-amd64
      chmod +x ~/.docker/cli-plugins/docker-buildx

Configure Docker to use Namespace Remote Builders

- run:
    name: Install nsc remote builder
    command: |
      nsc docker buildx setup --background --use

That's it! Now, your Docker builds will run on Namespace.