GoCD Plugin
Use the GoCD plugin to find pipelines and inspect recent runs, stages, and jobs. The plugin does not expose pipeline config, environment variables, source details, user identities, or console output.
Install
Section titled “Install”pnpm add @sentry/junior @sentry/junior-gocdimport { defineJuniorPlugins } from "@sentry/junior";import { gocdPlugin } from "@sentry/junior-gocd";
export const plugins = defineJuniorPlugins([gocdPlugin()]);Config
Section titled “Config”Set GOCD_URL and GOCD_ACCESS_TOKEN in the Junior environment, then redeploy.
Conversation defaults
Section titled “Conversation defaults”gocd.pipeline
Default pipeline when a request does not name one.
- Define:
jr-rpc config set gocd.pipeline <pipeline> - Install-wide default:
configDefaults["gocd.pipeline"] - Required: No
- Environment override: None
Plugin options
Section titled “Plugin options”baseUrl
GoCD server URL. Use this instead of GOCD_URL when the app defines plugin config in code.
- Define:
gocdPlugin({ baseUrl: "https://gocd.example.com" }) - Default:
GOCD_URL - Required: Yes
- Environment variable:
GOCD_URL
Environment variables
Section titled “Environment variables”GOCD_URL
HTTPS URL for the GoCD server.
- Define: Set
GOCD_URLin the deployment environment - Required: Yes unless
baseUrlis set - Environment override:
GOCD_URL
GOCD_ACCESS_TOKEN
Read-only GoCD API token.
- Define: Set
GOCD_ACCESS_TOKENin the deployment environment - Required: Yes for token auth
- Environment override:
GOCD_ACCESS_TOKEN
Apps behind an access proxy can pass credential hooks to gocdPlugin({ hooks }). The hooks must add the headers required by that proxy and GoCD.
Capabilities
Section titled “Capabilities”Junior can find visible pipelines and inspect pipeline history, one pipeline run, pipeline status, one stage run, or job history. All tools are read-only.
This plugin does not support resource subscriptions.
Verify
Section titled “Verify”Ask Junior: Show recent runs for <pipeline>. Confirm that the reply includes run, stage, and job results.
Failure modes
Section titled “Failure modes”- Base URL missing: Set
GOCD_URLor passbaseUrltogocdPlugin(). - GoCD returns
401or403: Check the token and its read access. - Pipeline not found: Check the pipeline name or set
gocd.pipeline. - Access proxy rejects the request: Add credential hooks for the proxy.
Next step
Section titled “Next step”Review Security Hardening.