PageSourceSearch

https://backstage.io/assets/js/077fb6d7.506df156.js

js backstage.io collected 2026-09-24 08:28:55 UTC 11,650 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbackstage_microsite=self.webpackChunkbackstage_microsite||[]).push([["16637"],{27779(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var i=n(466972),s=n(474848),o=n(28453);let a={id:"discovery",title:"Bitbucket Cloud Discovery",sidebar_label:"Discovery",description:"Automatically discovering catalog entities from repositories in Bitbucket Cloud"},r,c={},d=[{value:"Event-based Discovery",id:"event-based-discovery",level:2},{value:"Installation",id:"installation",level:2},{value:"Configuration",id:"configuration",level:2}];function l(e){let t={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["The Bitbucket Cloud integration has a special entity provider for discovering\ncatalog files located in ",(0,s.jsx)(t.a,{href:"https://bitbucket.org",children:"Bitbucket Cloud"}),".\nThe provider will search your Bitbucket Cloud account and register catalog files matching the configured path\nas Location entity and via following processing steps add all contained catalog entities.\nThis can be useful as an alternative to static locations or manually adding things to the catalog."]}),"\n",(0,s.jsx)(t.h2,{id:"event-based-discovery",children:"Event-based Discovery"}),"\n",(0,s.jsx)(t.p,{children:"Supported events for event-based updates:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/#Push",children:(0,s.jsx)(t.code,{children:"repo:push"})}),"\nreceived as ",(0,s.jsx)(t.code,{children:"bitbucket.repo:push"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/#Updated",children:(0,s.jsx)(t.code,{children:"repo:updated"})}),"\nreceived as ",(0,s.jsx)(t.code,{children:"bitbucket.repo:updated"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Changes are triggered if the repository slug/name changed, causing a new URL for it."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:'To receive events, you need to add webhook subscriptions at Bitbucket Cloud.\nEnable the triggers (event types) you want to receive.\nFor the entity provider, only the event types above are supported ("Repository Push" and/or "Repository Updated")\nand additional event types will be ignored (e.g., for other use cases/integrations you might have).'}),"\n",(0,s.jsx)(t.p,{children:"For more information on how to set up the event-based discovery, see the installation instructions below."}),"\n",(0,s.jsx)(t.h2,{id:"installation",children:"Installation"}),"\n",(0,s.jsxs)(t.p,{children:["You will have to add the entity provider in the catalog initialization code of your\nbackend. The provider is not installed by default, therefore you have to add a\ndependency to ",(0,s.jsx)(t.code,{children:"@backstage/plugin-catalog-backend-module-bitbucket-cloud"})," to your backend\npackage."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",metastring:'title="From your Backstage root directory"',children:"yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-bitbucket-cloud\n"})}),"\n",(0,s.jsx)(t.p,{children:"Then add the following to your backend:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",metastring:'title="packages/backend/src/index.ts"',children:"// optional if you want HTTP endpoints to receive external events\n// backend.add(import('@backstage/plugin-events-backend'));\n// optional if you want to use AWS SQS instead of HTTP endpoints to receive external events\n// backend.add(import('@backstage/plugin-events-backend-module-aws-sqs'));\nbackend.add(import('@backstage/plugin-events-backend-module-bitbucket-cloud'));\nbackend.add(import('@backstage/plugin-catalog-backend-module-bitbucket-cloud'));\n"})}),"\n",(0,s.jsx)(t.p,{children:"You need to decide how you want to re
1ceive events from external sources like"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md",children:"via HTTP endpoint"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md",children:"via an AWS SQS queue"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-google-pubsub/README.md",children:"via Google Pub/Sub"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-kafka/README.md",children:"via a Kafka topic"})}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Further documentation:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md",children:"https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md",children:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-bitbucket-cloud/README.md",children:"https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-bitbucket-cloud/README.md"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsxs)(t.p,{children:["To use the entity provider, you'll need a ",(0,s.jsx)(t.a,{href:"/docs/integrations/bitbucketCloud/locations",children:"Bitbucket Cloud integration set up"}),".\nVery likely a ",(0,s.jsx)(t.code,{children:"username"})," and ",(0,s.jsx)(t.code,{children:"appPassword"})," will be required\n(you are restricted to public repositories and a very low rate limit otherwise)."]}),"\n",(0,s.jsx)(t.p,{children:"Additionally, you need to configure your entity provider instance(s):"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-yaml",metastring:'title="app-config.yaml"',children:"catalog:\n  providers:\n    bitbucketCloud:\n      yourProviderId: # identifies your ingested dataset\n        catalogPath: /catalog-info.yaml # default value\n        filters: # optional\n          projectKey: '^apis-.*$' # optional; RegExp\n          repoSlug: '^service-.*$' # optional; RegExp\n        schedule: # same options as in SchedulerServiceTaskScheduleDefinition\n          # supports cron, ISO duration, \"human duration\" as used in code\n          frequency: { minutes: 30 }\n          # supports ISO duration, \"human duration\" as used in code\n          timeout: { minutes: 3 }\n        workspace: workspace-name\n"})}),"\n",(0,s.jsxs)(t.admonition,{type:"note",children:[(0,s.jsx)(t.p,{children:"It is possible but certainly not recommended to skip the provider ID level."}),(0,s.jsxs)(t.blockquote,{children:["\n",(0,s.jsxs)(t.p,{children:["If you do so, ",(0,s.jsx)(t.code,{children:"default"})," will be used as provider ID."]}),"\n"]})]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"catalogPath"})})," ",(0,s.jsx)(t.em,{children:"(optional)"}),":\nDefault: ",(0,s.jsx)(t.code,{children:"/catalog-info.yaml"}),".\nPath where to look for ",(0,s.jsx)(t.code,{children:"catalog-info.yaml"})," files.\nWhen started with ",(0,s.jsx)(t.code,{children:"/"}),", it is an absolute path from the repo root.\nIt supports values as allowed by the ",(0,s.jsx)(t.code,{children:"path"})," filter/modifier\n",(0,s.jsx)(t.a,{href:"https://confluence.atlassian.com/bitbucket/code-search-in-bitbucket-873876782.html#Search-Pathmodifier",children:"at Bitbucket Cloud's code search"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"filters"})})," ",(0,s.jsx)(t.em,{children:"(optional)"}),":\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"projectKey"})})," ",(0,s.jsx)(t.em,{children:"(optional)"}),":\nRegular expression used to filter results based on the project key."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"repoSlug"})})," ",(0,s.jsx)(t.em,{children:"(optional)"}),":\nRegular expression used to filter results based on the repo slug."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"schedule"})}),":\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"frequency"})}),":\nHow often you want the task to run. The system does its best to avoid overlapping invocations."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"timeout"})}),":\nThe maximum amount of time that a single task invocation can take."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"initialDelay"})})," ",(0,s.jsx)(t.em,{children:"(optional)"}),":\nThe amount of time that should pass before the first invocation happens."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"scope"})})," ",(0,s.jsx)(t.em,{children:"(optional)"}),":\n",(0,s.jsx)(t.code,{children:"'global'"})," or ",(0,s.jsx)(t.code,{children:"'local'"}),". Sets the scope of concurrency control."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.code,{children:"workspace"})}),":\nName of your organization account/workspace.\nIf you want to add multiple workspaces, you need to add one provider config each."]}),"\n"]})]})}function u(e={}){let{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,t,n){n.d(t,{R:()=>a,x:()=>r});var i=n(296540);let s={},o=i.createContext(s);function a(e){let t=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}},466972(e){e.exports=JSON.parse('{"id":"integrations/bitbucketCloud/discovery","title":"Bitbucket Cloud Discovery","description":"Automatically discovering catalog entities from repositories in Bitbucket Cloud","source":"@site/versioned_docs/version-stable/integrations/bitbucketCloud/discovery.md","sourceDirName":"integrations/bitbucketCloud","slug":"/integrations/bitbucketCloud/discovery","permalink":"/docs/integrations/bitbucketCloud/discovery","draft":false,"unlisted":false,"editUrl":"https://github.com/backstage/backstage/edit/master/docs/integrations/bitbucketCloud/discovery.md","tags":[],"version":"stable","frontMatter":{"id":"discovery","title":"Bitbucket Cloud Discovery","sidebar_label":"Discovery","description":"Automatically discovering catalog entities from repositories in Bitbucket Cloud"},"sidebar":"docs","previous":{"title":"Locations","permalink":"/docs/integrations/bitbucketCloud/locations"},"next":{"title":"Bitbucket Server","permalink":"/docs/bitbucket-server/generated-index"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.