How it works
Connecting a Buildkite organization creates a Namespace-managed queue and an agent token in either a new Namespace Cluster or an existing Buildkite cluster. A Buildkite webhook notifies Namespace when a job is scheduled on that cluster. Namespace then provisions an isolated instance, starts an agent for the queue, runs the job, and tears the instance down when the job completes. You can select the operating system, architecture, instance shape, base image, and persistent cache for each step using agent tags.Buildkite agents are a limited-access feature, reach out to get enrolled into Namespace-managed agents.Contact support →
Getting Started
Create a Buildkite API access token
Create an API access token for the Buildkite organization you want to connect. Namespace uses this token for initial setup, ongoing build reconciliation, and build annotations, so its expiry must be set to Never. The token can be revoked at any time through the Buildkite UI.
Enable these REST API scopes:
read_pipelinesread_buildsandwrite_buildsread_clustersandwrite_clustersread_organizations
Connect your Buildkite organization
Open Buildkite → Get started in the Namespace dashboard. If another organization is already connected, select Connect organization from the Organizations page instead.Enter the API token and click Next. Namespace uses the token to identify your Buildkite organization and list its clusters.
Select a cluster and queue
Choose where Namespace should create its managed queue:
- Select Create a new cluster to create the Namespace Cluster with a
defaultqueue. - Select an existing cluster to add a queue to it. Enter a queue name, or keep the default name,
namespace.
Configure the Buildkite webhook
On the next page, click on Create new Webhook and copy and paste the provided webhook URL and token.Select the following events in the Buildkite webhook interface:
pingjob.scheduledjob.startedjob.finished
Checking out code
Cloning with SSH
Cloning repositories over HTTPS works by default and requires no additional configuration. You can configure cloning over SSH by uploading your private key either to Namespace Vault or as a secret in Buildkite. Currently, signed pipelines with SSH checkout are supported only with secrets stored in Namespace. To configure cloning over SSH in Namespace:- Upload your private key as a secret, using either the Vault dashboard or CLI command
- In the Namespace dashboard, click on Edit Secrets and then Add another secret.
- Select SSH Key from the dropdown, select your key, and then click Save Variables.
checkout.ssh_secret on each of your pipeline’s steps that require SSH access:
Git snapshots
Git snapshots are in early access. Reach out to enable them for your workspace.Contact support →
- Navigate to the Vault dashboard.
- Scroll down to GitHub checkout associations and click Connect Organization to connect your GitHub organization to Namespace.
- Open Buildkite → Organizations in the Namespace dashboard and select your Buildkite organization.
- Click the toggle to enable git snapshots.
ensureoncode/git/snapshots/*, which allows the instance to start or reuse the workspace’s git snapshot service.listandissue_tokenongithub-association/*, which allow the snapshot service to find the associated GitHub organization and request a short-lived repository access token.
Use a snapshot in a job
After enabling snapshots for the installation, set thensc-git-checkout agent tag to snapshot on a pipeline or individual step:
nsc-git-checkout to clone or default.