{"_id":"@buildkite/plugin-buildkite","_rev":"2-e5255bff96c3f2346bdee10426e0a03a","name":"@buildkite/plugin-buildkite","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.1":{"name":"@buildkite/plugin-buildkite","version":"0.5.1","license":"Apache-2.0","_id":"@buildkite/plugin-buildkite@0.5.1","maintainers":[{"name":"dev_buildkite","email":"dev@buildkite.com"},{"name":"gordon_buildkite","email":"gordon@buildkite.com"},{"name":"blaknite","email":"blaknite@thelanbox.com.au"},{"name":"mcncl","email":"ben.mcnicholl@buildkite.com"},{"name":"pda-bk","email":"paul@buildkite.com"}],"dist":{"shasum":"fa2ec43f27f6c2240e0afc51f9c957d194b0ab90","tarball":"https://registry.npmjs.org/@buildkite/plugin-buildkite/-/plugin-buildkite-0.5.1.tgz","fileCount":76,"integrity":"sha512-grs/a5XrGLEhbAJ+jt6ZgUvscRh3AvBNq5hxMuU/thu37iBW1l8xaEBfbrqVSZcqbSublcWsqgBEPvEMdVhoEw==","signatures":[{"sig":"MEQCIF2xkFn2UMggK8bHMN01jHIBltEOXps8KJQlM+Hu6yLZAiAkhrmSNUBqhnuu/2y8AvZxTSWwFgYLFecvMLgXZtCkPg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":431578},"main":"src/index.ts","types":"src/index.ts","exports":{".":"./src/index.ts","./components":"./src/components/index.ts","./package.json":"./package.json"},"gitHead":"39067d8d28882ccd64c000898148566f627d554c","scripts":{"tsc":"tsc","lint":"backstage-cli package lint","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"mcncl","email":"ben.mcnicholl@buildkite.com"},"backstage":{"role":"frontend-plugin","pluginId":"buildkite","pluginPackages":["@buildkite/plugin-buildkite"]},"_npmVersion":"11.3.0","description":"A Buildkite plugin for Backstage that provides deep integration with your Buildkite CI/CD pipelines.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.0","dependencies":{"dotenv":"^16.4.5","date-fns":"^2.30.0","react-dom":"^18.3.1","react-use":"^17.2.4","@backstage/theme":"^0.6.3","@material-ui/lab":"4.0.0-alpha.61","@backstage/config":"^1.2.0","@date-io/date-fns":"^2.17.0","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/pickers":"^3.3.11","@backstage/catalog-model":"^1.7.0","@backstage/core-components":"^0.17.0","@backstage/core-plugin-api":"^1.9.3"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"components":["src/components/index.ts"],"package.json":["package.json"]}},"_hasShrinkwrap":false,"devDependencies":{"msw":"^1.0.0","react":"^16.13.1 || ^17.0.0 || ^18.0.0","eslint":"^9.15.0","globals":"^15.12.0","@eslint/js":"^9.14.0","@backstage/cli":"^0.31.0","react-router-dom":"^6.25.0","typescript-eslint":"^8.14.0","eslint-plugin-jest":"^28.11.0","eslint-plugin-react":"^7.37.2","@backstage/dev-utils":"^1.0.34","eslint-plugin-import":"^2.31.0","eslint-plugin-notice":"^1.0.0","@backstage/test-utils":"^1.5.7","@testing-library/react":"^14.0.0","@backstage/core-app-api":"^1.13.0","@backstage/eslint-plugin":"^0.1.10","@testing-library/jest-dom":"^6.0.0","@typescript-eslint/parser":"^8.16.0","@testing-library/user-event":"^14.0.0","eslint-plugin-unused-imports":"^4.1.4","eslint-plugin-testing-library":"^6.4.0","@typescript-eslint/eslint-plugin":"^8.16.0","eslint-import-resolver-typescript":"^3.6.3"},"peerDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","react-router-dom":"^6.25.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-buildkite_0.5.1_1744329163422_0.16316543880866985","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @buildkite/backstage-plugin-buildkite. Please update your dependencies."}},"time":{"created":"2025-04-10T23:52:43.343Z","modified":"2025-04-17T05:54:29.278Z","0.5.1":"2025-04-10T23:52:43.618Z"},"license":"Apache-2.0","description":"A Buildkite plugin for Backstage that provides deep integration with your Buildkite CI/CD pipelines.","maintainers":[{"name":"blaknite","email":"blaknite@thelanbox.com.au"},{"name":"dev_buildkite","email":"dev@buildkite.com"},{"name":"gordon_buildkite","email":"gordon@buildkite.com"},{"name":"mcncl","email":"ben.mcnicholl@buildkite.com"},{"name":"pda-bk","email":"paul@buildkite.com"}],"readme":"# Buildkite Backstage Plugin\n\nA Buildkite plugin for Backstage that provides deep integration with your Buildkite CI/CD pipelines.\n\n## ✨ Features\n\n🔍 **Enhanced Pipeline Visibility**\n- Real-time build status monitoring with automatic updates\n- Hierarchical branch-based organization of builds\n- Detailed step-by-step build progress tracking\n- Comprehensive build logs with syntax highlighting\n\n⚡️ **Powerful Filtering & Search**\n- Full-text search across builds, messages, authors, branches, and commit IDs\n- Smart date range filtering with preset options (Today, Yesterday, Last 7 days, Last 30 days)\n- Multi-criteria filtering by branch, creator, and build status\n- Automatic status-based grouping and organization\n\n📊 **Rich Build Information**\n- Detailed build status with step-by-step progress\n- Build timing and duration tracking\n- Commit and branch context\n- Author information with avatars\n- Build trigger information\n\n🛠️ **Interactive Build Management**\n- One-click rebuild functionality\n- Expandable/collapsible build details\n- Interactive build step inspection\n- Direct links to Buildkite\n\n⚙️ **Advanced Customization**\n- UTC/Local time toggle with persistent preferences\n- Branch-level collapsing\n- Automatic expansion of running builds\n- Custom pipeline styling with avatars\n\n## Prerequisites\n\n- Buildkite account with API access\n- Required API token permissions:\n  - `read_pipelines`\n  - `read_builds`\n  - `read_user`\n  - `write_builds` (for rebuild functionality)\n\n## Installation\n\n### Plugin Installation\n\nIf the plugin is in your project's plugins directory:\n\n```bash\nyarn workspace app add @buildkite/plugin-buildkite\n```\n\nIf you're installing from an external package:\n\n```bash\nyarn workspace app add @buildkite/plugin-buildkite\n```\n\n### Configuration\n\n1. Add the proxy configuration to your `app-config.yaml`:\n\n```yaml\nproxy:\n  endpoints:\n    '/buildkite/api':\n      target: https://api.buildkite.com/v2\n      headers:\n        Authorization: Bearer ${BUILDKITE_API_TOKEN}\n        Accept: application/json\n      allowedHeaders: ['Authorization']\n\nbuildkite:\n  apiToken: ${BUILDKITE_API_TOKEN}\n  organization: ${BUILDKITE_ORGANIZATION}\n```\n\n2. Create or update `packages/app/src/plugins.ts` to register the plugin:\n\n```typescript\n// Import plugins that you want to be included in your app\nexport { buildkitePlugin } from '@buildkite/plugin-buildkite';\n```\n\n3. Make sure to import the plugins file in your `packages/app/src/App.tsx`:\n\n```typescript\n// Import plugins\nimport './plugins';\n```\n\n4. Add the API factory in `packages/app/src/apis.ts`:\n\n```typescript\nimport { buildkiteAPIRef, BuildkiteClient } from '@buildkite/plugin-buildkite';\n\nexport const apis: AnyApiFactory[] = [\n  createApiFactory({\n    api: buildkiteAPIRef,\n    deps: { discoveryApi: discoveryApiRef, fetchApi: fetchApiRef, configApi: configApiRef },\n    factory: ({ discoveryApi, fetchApi, configApi }) => {\n      const buildkiteConfig = configApi.getOptionalConfig('buildkite');\n      return new BuildkiteClient({\n        discoveryAPI: discoveryApi,\n        fetchAPI: fetchApi,\n        config: {\n          organization: buildkiteConfig?.getOptionalString('organization') ?? 'default-org',\n          defaultPageSize: buildkiteConfig?.getOptionalNumber('defaultPageSize') ?? 25,\n          apiBaseUrl: buildkiteConfig?.getOptionalString('apiBaseUrl') ?? 'https://api.buildkite.com/v2',\n        },\n      });\n    },\n  }),\n];\n```\n\n5. Add routes in `packages/app/src/App.tsx`:\n\n```typescript\nimport { PipelinePage } from '@buildkite/plugin-buildkite';\n\nconst routes = (\n  <FlatRoutes>\n    {/* Other routes... */}\n\n    {/* Buildkite Plugin Routes */}\n    <Route path=\"/buildkite\" element={<PipelinePage />} />\n    <Route path=\"/buildkite/build/:pipelineSlug/:buildNumber\" element={<BuildPage />} />\n    <Route path=\"/buildkite/pipeline/:orgSlug/:pipelineSlug\" element={<PipelinePage />} />\n  </FlatRoutes>\n);\n```\n\n6. Add to your Entity Page in `packages/app/src/components/catalog/EntityPage.tsx`:\n\n```typescript\nimport { isBuildkiteAvailable, BuildkiteWrapper } from '@buildkite/plugin-buildkite';\n\nconst cicdContent = (\n  <EntitySwitch>\n    <EntitySwitch.Case if={isBuildkiteAvailable}>\n      <BuildkiteWrapper />\n    </EntitySwitch.Case>\n    <EntitySwitch.Case>\n      <EmptyState\n        title=\"No CI/CD available for this entity\"\n        missing=\"info\"\n        description=\"Add a Buildkite annotation to enable CI/CD visualization\"\n      />\n    </EntitySwitch.Case>\n  </EntitySwitch>\n);\n\nconst defaultEntityPage = (\n  <EntityLayout>\n    {/* Other routes... */}\n\n    <EntityLayout.Route path=\"/ci-cd\" title=\"CI/CD\">\n      {cicdContent}\n    </EntityLayout.Route>\n  </EntityLayout>\n);\n```\n\n### Component Configuration\n\nAdd the Buildkite annotation to your component's `catalog-info.yaml`:\n\n```yaml\nmetadata:\n  annotations:\n    buildkite.com/pipeline-slug: organization-slug/pipeline-slug\n```\n\n## Development\n\n```bash\n# Install dependencies\nyarn install\n\n# Start plugin in development mode\nyarn start\n\n# Run tests\nyarn test\n\n# Build plugin\nyarn build\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Authentication Errors**\n   - Verify `BUILDKITE_API_TOKEN` is set in your environment\n   - Check API token has required permissions\n   - Confirm proxy configuration in `app-config.yaml`\n\n2. **Missing Build Data**\n   - Verify pipeline slug format: `organization-slug/pipeline-slug`\n   - Check organization and pipeline names are correct\n   - Ensure builds exist within selected date range\n   - Confirm all filters are set correctly\n\n3. **Real-time Updates Not Working**\n   - Check browser tab is active (updates pause in background)\n   - Verify network connectivity\n   - Ensure API token hasn't expired\n\n4. **Build Logs Not Loading**\n   - Confirm API token has `read_builds` permission\n   - Check build exists and is accessible\n   - Verify proxy configuration can handle log requests\n\n## Contributing\n\nPlease read our [Contributing Guide](docs/CONTRIBUTING.md) before submitting a Pull Request.\n","readmeFilename":"README.md"}