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 email@example.com 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
firstname.lastname@example.org 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:
name: Install latest nsc and set up access to Namespace
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.
name: update buildx
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
name: Install nsc remote builder
nsc docker buildx setup --background --use
That's it! Now, your Docker builds will run on Namespace.