switchroom 0.13.2 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-scheduler/index.js +2 -2
- package/dist/auth-broker/index.js +2 -2
- package/dist/cli/switchroom.js +132 -214
- package/dist/host-control/main.js +2 -2
- package/dist/vault/approvals/kernel-server.js +2 -2
- package/dist/vault/broker/server.js +2 -2
- package/package.json +1 -1
- package/profiles/_base/start.sh.hbs +8 -8
- package/profiles/default/CLAUDE.md.hbs +1 -1
- package/telegram-plugin/dist/gateway/gateway.js +42 -10
- package/telegram-plugin/gateway/boot-probes.ts +13 -6
- package/telegram-plugin/gateway/gateway.ts +44 -6
- package/telegram-plugin/hooks/silent-end-interrupt-stop.mjs +5 -1
- package/telegram-plugin/silent-end.ts +56 -0
- package/telegram-plugin/tests/boot-probes.test.ts +26 -2
- package/telegram-plugin/tests/silent-end.test.ts +69 -0
- package/telegram-plugin/uat/scenarios/bridge-flap-resilience-dm.test.ts +166 -0
- package/skills/buildkite-agent-infrastructure/SKILL.md +0 -321
- package/skills/buildkite-agent-infrastructure/agents/openai.yaml +0 -6
- package/skills/buildkite-agent-infrastructure/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-agent-infrastructure/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-agent-infrastructure/references/audit-logging.md +0 -87
- package/skills/buildkite-agent-infrastructure/references/graphql-mutations.md +0 -690
- package/skills/buildkite-agent-infrastructure/references/instance-shapes.md +0 -38
- package/skills/buildkite-agent-infrastructure/references/pipeline-templates.md +0 -73
- package/skills/buildkite-agent-infrastructure/references/self-hosted-agents.md +0 -137
- package/skills/buildkite-agent-infrastructure/references/sso-saml.md +0 -92
- package/skills/buildkite-agent-runtime/SKILL.md +0 -509
- package/skills/buildkite-agent-runtime/agents/openai.yaml +0 -6
- package/skills/buildkite-agent-runtime/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-agent-runtime/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-agent-runtime/references/flag-reference.md +0 -417
- package/skills/buildkite-agent-runtime/references/patterns-and-recipes.md +0 -555
- package/skills/buildkite-api/SKILL.md +0 -308
- package/skills/buildkite-api/agents/openai.yaml +0 -6
- package/skills/buildkite-api/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-api/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-api/references/graphql-reference.md +0 -195
- package/skills/buildkite-api/references/patterns.md +0 -44
- package/skills/buildkite-api/references/webhooks.md +0 -161
- package/skills/buildkite-cli/SKILL.md +0 -397
- package/skills/buildkite-cli/agents/openai.yaml +0 -6
- package/skills/buildkite-cli/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-cli/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-cli/references/command-reference.md +0 -181
- package/skills/buildkite-migration/SKILL.md +0 -195
- package/skills/buildkite-pipelines/SKILL.md +0 -481
- package/skills/buildkite-pipelines/agents/openai.yaml +0 -6
- package/skills/buildkite-pipelines/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-pipelines/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-pipelines/examples/basic-pipeline.yml +0 -24
- package/skills/buildkite-pipelines/examples/optimized-pipeline.yml +0 -100
- package/skills/buildkite-pipelines/references/advanced-patterns.md +0 -286
- package/skills/buildkite-pipelines/references/retry-and-error-codes.md +0 -131
- package/skills/buildkite-pipelines/references/step-types-reference.md +0 -225
- package/skills/buildkite-secure-delivery/SKILL.md +0 -182
- package/skills/buildkite-secure-delivery/agents/openai.yaml +0 -6
- package/skills/buildkite-secure-delivery/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-secure-delivery/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-secure-delivery/references/oidc-cloud-providers.md +0 -83
- package/skills/buildkite-secure-delivery/references/package-publishing.md +0 -100
- package/skills/buildkite-test-engine/SKILL.md +0 -256
- package/skills/buildkite-test-engine/agents/openai.yaml +0 -6
- package/skills/buildkite-test-engine/assets/buildkite-icon-large.png +0 -0
- package/skills/buildkite-test-engine/assets/buildkite-icon-small.png +0 -0
- package/skills/buildkite-test-engine/examples/bktec-splitting.yml +0 -16
- package/skills/buildkite-test-engine/examples/collector-pipeline.yml +0 -11
- package/skills/buildkite-test-engine/references/collectors.md +0 -198
- package/skills/buildkite-test-engine/references/splitting-examples.md +0 -93
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Pipeline Templates
|
|
2
|
-
|
|
3
|
-
Pipeline templates (Enterprise-only) standardize pipeline YAML across the organization. Templates define a base configuration that pipelines inherit, ensuring consistency for security, compliance, or organizational standards.
|
|
4
|
-
|
|
5
|
-
## Create a template
|
|
6
|
-
|
|
7
|
-
```graphql
|
|
8
|
-
mutation {
|
|
9
|
-
pipelineTemplateCreate(input: {
|
|
10
|
-
organizationId: "org-id"
|
|
11
|
-
name: "Standard CI Template"
|
|
12
|
-
description: "Organization-standard CI pipeline with security scanning and artifact signing"
|
|
13
|
-
available: true
|
|
14
|
-
configuration: """
|
|
15
|
-
steps:
|
|
16
|
-
- label: ":pipeline: Upload"
|
|
17
|
-
command: buildkite-agent pipeline upload
|
|
18
|
-
|
|
19
|
-
- wait
|
|
20
|
-
|
|
21
|
-
- label: ":shield: Security Scan"
|
|
22
|
-
command: "scripts/security-scan.sh"
|
|
23
|
-
agents:
|
|
24
|
-
queue: "security-scanners"
|
|
25
|
-
|
|
26
|
-
- wait
|
|
27
|
-
|
|
28
|
-
- label: ":rocket: Deploy"
|
|
29
|
-
command: "scripts/deploy.sh"
|
|
30
|
-
branches: "main"
|
|
31
|
-
concurrency: 1
|
|
32
|
-
concurrency_group: "deploy/production"
|
|
33
|
-
"""
|
|
34
|
-
}) {
|
|
35
|
-
pipelineTemplate {
|
|
36
|
-
id
|
|
37
|
-
uuid
|
|
38
|
-
name
|
|
39
|
-
available
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
| Field | Required | Description |
|
|
46
|
-
|-------|----------|-------------|
|
|
47
|
-
| `organizationId` | Yes | Organization GraphQL ID |
|
|
48
|
-
| `name` | Yes | Template name |
|
|
49
|
-
| `description` | No | What this template provides |
|
|
50
|
-
| `configuration` | Yes | Pipeline YAML string |
|
|
51
|
-
| `available` | No | Whether teams can select this template (default: `false`) |
|
|
52
|
-
|
|
53
|
-
## Update a template
|
|
54
|
-
|
|
55
|
-
```graphql
|
|
56
|
-
mutation {
|
|
57
|
-
pipelineTemplateUpdate(input: {
|
|
58
|
-
id: "template-id"
|
|
59
|
-
name: "Standard CI Template v2"
|
|
60
|
-
configuration: "..."
|
|
61
|
-
available: true
|
|
62
|
-
}) {
|
|
63
|
-
pipelineTemplate { id name }
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## Template strategy
|
|
69
|
-
|
|
70
|
-
- Create a small number of templates (3-5) covering common patterns: basic CI, CI + deploy, CI + security scan + deploy
|
|
71
|
-
- Set `available: true` only for templates ready for teams to adopt
|
|
72
|
-
- Templates use standard pipeline YAML — test the YAML as a regular pipeline before promoting to a template
|
|
73
|
-
- Assign templates to pipelines via the Buildkite UI or API
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
# Self-Hosted Agent Configuration and Lifecycle Hooks
|
|
2
|
-
|
|
3
|
-
## Self-Hosted Agent Configuration
|
|
4
|
-
|
|
5
|
-
Self-hosted agents run on your own infrastructure and connect to Buildkite using an agent token. Configure them via `buildkite-agent.cfg` or environment variables.
|
|
6
|
-
|
|
7
|
-
### Key configuration settings
|
|
8
|
-
|
|
9
|
-
```ini
|
|
10
|
-
# /etc/buildkite-agent/buildkite-agent.cfg
|
|
11
|
-
|
|
12
|
-
# Authentication
|
|
13
|
-
token="your-agent-token"
|
|
14
|
-
|
|
15
|
-
# Agent identity
|
|
16
|
-
name="backend-agent-%hostname-%n"
|
|
17
|
-
tags="queue=linux-large,team=backend,os=linux"
|
|
18
|
-
priority=1
|
|
19
|
-
|
|
20
|
-
# Job execution
|
|
21
|
-
build-path="/var/lib/buildkite-agent/builds"
|
|
22
|
-
hooks-path="/etc/buildkite-agent/hooks"
|
|
23
|
-
plugins-path="/etc/buildkite-agent/plugins"
|
|
24
|
-
|
|
25
|
-
# Concurrency
|
|
26
|
-
spawn=4
|
|
27
|
-
|
|
28
|
-
# Security
|
|
29
|
-
no-command-eval=true
|
|
30
|
-
no-local-hooks=false
|
|
31
|
-
no-plugins=false
|
|
32
|
-
allowed-repositories="git@github.com:my-org/*"
|
|
33
|
-
|
|
34
|
-
# Lifecycle
|
|
35
|
-
disconnect-after-job=true
|
|
36
|
-
cancel-grace-period=30
|
|
37
|
-
|
|
38
|
-
# Experiments
|
|
39
|
-
experiment="normalised-upload-paths,resolve-commit-after-checkout"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
| Setting | Default | Description |
|
|
43
|
-
|---------|---------|-------------|
|
|
44
|
-
| `token` | — | Agent registration token (required) |
|
|
45
|
-
| `name` | `%hostname-%n` | Agent name template (`%hostname`, `%n` for spawn index) |
|
|
46
|
-
| `tags` | — | Comma-separated `key=value` pairs for routing |
|
|
47
|
-
| `priority` | `0` | Higher priority agents pick up jobs first |
|
|
48
|
-
| `spawn` | `1` | Number of parallel agents to run |
|
|
49
|
-
| `build-path` | varies | Directory where builds execute |
|
|
50
|
-
| `hooks-path` | varies | Path to agent-level hook scripts |
|
|
51
|
-
| `disconnect-after-job` | `false` | Disconnect after each job (for ephemeral/autoscaled agents) |
|
|
52
|
-
| `cancel-grace-period` | `10` | Seconds to wait for graceful shutdown |
|
|
53
|
-
| `no-command-eval` | `false` | Restrict to script-only execution (security hardening) |
|
|
54
|
-
| `allowed-repositories` | — | Glob patterns for repos this agent can build |
|
|
55
|
-
|
|
56
|
-
### Clustered vs. unclustered agents
|
|
57
|
-
|
|
58
|
-
**Clustered agents** belong to a cluster and target a single queue:
|
|
59
|
-
|
|
60
|
-
```ini
|
|
61
|
-
token="cluster-agent-token"
|
|
62
|
-
tags="queue=linux-large"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Clustered agents use a cluster-scoped token and can only have one `queue` tag.
|
|
66
|
-
|
|
67
|
-
**Unclustered agents** use an organization-level token and can have multiple tags:
|
|
68
|
-
|
|
69
|
-
```ini
|
|
70
|
-
token="org-agent-token"
|
|
71
|
-
tags="queue=default,os=linux,size=large"
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Prefer clustered agents for new deployments. Clusters provide secret scoping, queue isolation, and better organizational control.
|
|
75
|
-
|
|
76
|
-
## Agent Lifecycle Hooks
|
|
77
|
-
|
|
78
|
-
Hooks are shell scripts that execute at specific points during the agent and job lifecycle. Use them for secret injection, environment setup, security validation, and cleanup.
|
|
79
|
-
|
|
80
|
-
### Hook execution order (per job)
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
environment → Set environment variables for the job
|
|
84
|
-
pre-checkout → Runs before git checkout
|
|
85
|
-
checkout → The git checkout itself (override to customize)
|
|
86
|
-
post-checkout → Runs after git checkout (e.g., submodule init)
|
|
87
|
-
pre-command → Runs before the step command (secret injection, validation)
|
|
88
|
-
command → The step command itself (override to customize execution)
|
|
89
|
-
post-command → Runs after the step command (cleanup, notifications)
|
|
90
|
-
pre-exit → Runs before the agent exits the job (final cleanup)
|
|
91
|
-
pre-artifact → Runs before artifact upload
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Hook scopes
|
|
95
|
-
|
|
96
|
-
| Scope | Location | Applies to |
|
|
97
|
-
|-------|----------|------------|
|
|
98
|
-
| Agent-level | `hooks-path` in `buildkite-agent.cfg` | All jobs on this agent |
|
|
99
|
-
| Repository-level | `.buildkite/hooks/` in the repo | Jobs from this repo only |
|
|
100
|
-
| Plugin-level | Inside the plugin directory | Jobs using the plugin |
|
|
101
|
-
|
|
102
|
-
Agent-level hooks run first, then repository hooks, then plugin hooks.
|
|
103
|
-
|
|
104
|
-
### Environment hook — secret injection
|
|
105
|
-
|
|
106
|
-
The `environment` hook is the most common agent-level hook. Use it to inject secrets from external providers:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
#!/bin/bash
|
|
110
|
-
# /etc/buildkite-agent/hooks/environment
|
|
111
|
-
|
|
112
|
-
set -euo pipefail
|
|
113
|
-
|
|
114
|
-
# Inject secrets from AWS Secrets Manager
|
|
115
|
-
if [[ "${BUILDKITE_PIPELINE_SLUG}" == "deploy-"* ]]; then
|
|
116
|
-
export AWS_ACCESS_KEY_ID=$(aws secretsmanager get-secret-value \
|
|
117
|
-
--secret-id "buildkite/deploy/aws-key" --query SecretString --output text)
|
|
118
|
-
fi
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Environment hook — security validation
|
|
122
|
-
|
|
123
|
-
Lock down which repositories, commands, and plugins agents execute:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
#!/bin/bash
|
|
127
|
-
# /etc/buildkite-agent/hooks/environment
|
|
128
|
-
|
|
129
|
-
set -euo pipefail
|
|
130
|
-
|
|
131
|
-
# Restrict to allowed repositories
|
|
132
|
-
ALLOWED_REPOS="^git@github\.com:my-org/"
|
|
133
|
-
if [[ ! "${BUILDKITE_REPO}" =~ ${ALLOWED_REPOS} ]]; then
|
|
134
|
-
echo "Unauthorized repository: ${BUILDKITE_REPO}"
|
|
135
|
-
exit 1
|
|
136
|
-
fi
|
|
137
|
-
```
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# SSO/SAML Configuration
|
|
2
|
-
|
|
3
|
-
Configure SSO to centralize authentication for the organization. Buildkite supports SAML 2.0 providers (Okta, Azure AD, Google Workspace, OneLogin, etc.).
|
|
4
|
-
|
|
5
|
-
## Set up a SAML provider
|
|
6
|
-
|
|
7
|
-
**Step 1 — Create the provider:**
|
|
8
|
-
|
|
9
|
-
```graphql
|
|
10
|
-
mutation {
|
|
11
|
-
ssoProviderCreate(input: {
|
|
12
|
-
organizationId: "org-id"
|
|
13
|
-
type: SAML
|
|
14
|
-
emailDomain: "example.com"
|
|
15
|
-
emailDomainVerificationAddress: "admin@example.com"
|
|
16
|
-
}) {
|
|
17
|
-
ssoProvider {
|
|
18
|
-
id
|
|
19
|
-
state
|
|
20
|
-
serviceProvider {
|
|
21
|
-
metadata { url }
|
|
22
|
-
ssoURL # ACS URL — configure in IdP
|
|
23
|
-
issuer # Entity ID — configure in IdP
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**Step 2 — Configure the IdP** with the returned `ssoURL` (ACS URL) and `issuer` (Entity ID).
|
|
31
|
-
|
|
32
|
-
**Step 3 — Update with IdP metadata:**
|
|
33
|
-
|
|
34
|
-
```graphql
|
|
35
|
-
# Option A: Metadata URL (preferred — auto-updates)
|
|
36
|
-
mutation {
|
|
37
|
-
ssoProviderUpdate(input: {
|
|
38
|
-
id: "sso-provider-id"
|
|
39
|
-
identityProvider: {
|
|
40
|
-
metadata: { url: "https://idp.example.com/saml/metadata" }
|
|
41
|
-
}
|
|
42
|
-
}) {
|
|
43
|
-
ssoProvider { id state }
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
# Option B: Manual configuration
|
|
48
|
-
mutation {
|
|
49
|
-
ssoProviderUpdate(input: {
|
|
50
|
-
id: "sso-provider-id"
|
|
51
|
-
identityProvider: {
|
|
52
|
-
ssoURL: "https://idp.example.com/saml/sso"
|
|
53
|
-
issuer: "https://idp.example.com"
|
|
54
|
-
certificate: "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
|
|
55
|
-
}
|
|
56
|
-
}) {
|
|
57
|
-
ssoProvider { id state }
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Step 4 — Verify the email domain** (Buildkite sends a verification email to the address specified).
|
|
63
|
-
|
|
64
|
-
**Step 5 — Enable the provider** once verification completes and IdP is configured.
|
|
65
|
-
|
|
66
|
-
## Query SSO providers
|
|
67
|
-
|
|
68
|
-
```graphql
|
|
69
|
-
query {
|
|
70
|
-
organization(slug: "my-org") {
|
|
71
|
-
ssoProviders(first: 10) {
|
|
72
|
-
edges {
|
|
73
|
-
node {
|
|
74
|
-
id
|
|
75
|
-
type
|
|
76
|
-
state
|
|
77
|
-
emailDomain
|
|
78
|
-
enabledAt
|
|
79
|
-
... on SSOProviderSAML {
|
|
80
|
-
identityProvider { ssoURL issuer certificate metadata { url xml } }
|
|
81
|
-
}
|
|
82
|
-
... on SSOProviderGoogleGSuite {
|
|
83
|
-
googleHostedDomain
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Provider states: `PENDING` (created, awaiting config), `DISABLED` (configured but off), `ENABLED` (active).
|