{"_id":"@binhnt83/plugin-jenkins-backend","_rev":"3-38d494656e4e92520b86aa6bb085b1fc","name":"@binhnt83/plugin-jenkins-backend","dist-tags":{"latest":"0.10.0"},"versions":{"0.7.0":{"name":"@binhnt83/plugin-jenkins-backend","version":"0.7.0","license":"Apache-2.0","_id":"@binhnt83/plugin-jenkins-backend@0.7.0","maintainers":[{"name":"binhnt83","email":"thanhbinh.uet@gmail.com"}],"homepage":"https://backstage.io","bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"dist":{"shasum":"edabf4e6dfe96f3d52c87dcf7ffd99a112d0534f","tarball":"https://registry.npmjs.org/@binhnt83/plugin-jenkins-backend/-/plugin-jenkins-backend-0.7.0.tgz","fileCount":6,"integrity":"sha512-iB4ql2exmxISXD8Zwwum5/yNR5ISst2UKbbfq05uLiAbRZcQk22zT98xAyYbDM86CMZ+vVfAdtqcT7dTPFp8Ww==","signatures":[{"sig":"MEUCIQDtpxhOA8Rmp5refy2HRgIV+dL9S2U6RMcvJqdjWYOwZQIga4pMtsGrZsdezhNmADfZXu3yhrCRqobDJWudvqs7Yj4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":131277},"main":"src/index.ts","types":"src/index.ts","gitHead":"fcd5aec5e28d453557db54f7f1b8486d765dc2d8","scripts":{"lint":"backstage-cli package lint","test":"jest","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":"binhnt83","email":"thanhbinh.uet@gmail.com"},"backstage":{"role":"backend-plugin","pluginId":"jenkins","pluginPackages":["@backstage-community/plugin-jenkins","@backstage-community/plugin-jenkins-backend","@backstage-community/plugin-jenkins-common"]},"repository":{"url":"git+https://github.com/backstage/community-plugins.git","type":"git","directory":"workspaces/jenkins/plugins/jenkins-backend"},"_npmVersion":"10.8.2","description":"BinhNT83 Vingroup JSC custom Backstage backend plugin that integrates towards Jenkins","directories":{},"_nodeVersion":"20.17.0","configSchema":"config.d.ts","dependencies":{"yn":"^4.0.0","express":"^4.17.1","jenkins":"^1.0.0","supertest":"^7.0.0","node-fetch":"^2.6.7","@types/express":"^4.17.6","@backstage/config":"^1.2.0","@backstage/errors":"^1.2.4","express-promise-router":"^4.1.0","@backstage/catalog-model":"^1.6.0","@backstage/backend-common":"^0.24.0","@backstage/catalog-client":"^1.6.6","@backstage/backend-plugin-api":"^0.8.0","@backstage/plugin-catalog-node":"^1.12.5","@backstage/plugin-permission-node":"^0.8.1","@backstage/plugin-permission-common":"^0.8.1","@backstage-community/plugin-jenkins-common":"workspace:^"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.2.5","@types/jest":"^29.5.13","@backstage/cli":"^0.27.0","@types/jenkins":"^1.0.0","@types/supertest":"^6.0.0","@types/node-fetch":"^2.5.12","@backstage/backend-defaults":"^0.4.3","@backstage/backend-test-utils":"^0.5.0","@backstage/plugin-auth-backend":"^0.23.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-jenkins-backend_0.7.0_1729842681572_0.028995446497962707","host":"s3://npm-registry-packages"}},"0.8.0":{"name":"@binhnt83/plugin-jenkins-backend","version":"0.8.0","license":"Apache-2.0","_id":"@binhnt83/plugin-jenkins-backend@0.8.0","maintainers":[{"name":"binhnt83","email":"thanhbinh.uet@gmail.com"}],"homepage":"https://backstage.io","bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"dist":{"shasum":"96d3f8a301eb272e1dbad43160c6faaae644baee","tarball":"https://registry.npmjs.org/@binhnt83/plugin-jenkins-backend/-/plugin-jenkins-backend-0.8.0.tgz","fileCount":6,"integrity":"sha512-1CNUCUo055fg8mIQKLAib7xzCQIO/mvPjBN0Iv4myI61RTDSFM3t0wa4I5P66ZVxkSA7jOJgMTFb6cR3a67yxw==","signatures":[{"sig":"MEUCIQDy8LIc7HvoKswGtQN3QJUqd5ptu+U9uofn620eixK3jQIgEbDojtB0mb3rUzVmBQKIvQ8DSTQ6xklWFspj8ncNOzc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":131273},"main":"src/index.ts","types":"src/index.ts","gitHead":"fcd5aec5e28d453557db54f7f1b8486d765dc2d8","scripts":{"lint":"backstage-cli package lint","test":"jest","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":"binhnt83","email":"thanhbinh.uet@gmail.com"},"backstage":{"role":"backend-plugin","pluginId":"jenkins","pluginPackages":["@backstage-community/plugin-jenkins","@backstage-community/plugin-jenkins-backend","@backstage-community/plugin-jenkins-common"]},"repository":{"url":"git+https://github.com/backstage/community-plugins.git","type":"git","directory":"workspaces/jenkins/plugins/jenkins-backend"},"_npmVersion":"10.8.2","description":"BinhNT83 Vingroup JSC custom Backstage backend plugin that integrates towards Jenkins","directories":{},"_nodeVersion":"20.17.0","configSchema":"config.d.ts","dependencies":{"yn":"^4.0.0","express":"^4.17.1","jenkins":"^1.0.0","supertest":"^7.0.0","node-fetch":"^2.6.7","@types/express":"^4.17.6","@backstage/config":"^1.2.0","@backstage/errors":"^1.2.4","express-promise-router":"^4.1.0","@backstage/catalog-model":"^1.6.0","@backstage/backend-common":"^0.24.0","@backstage/catalog-client":"^1.6.6","@backstage/backend-plugin-api":"^0.8.0","@backstage/plugin-catalog-node":"^1.12.5","@backstage/plugin-permission-node":"^0.8.1","@backstage/plugin-permission-common":"^0.8.1","@backstage-community/plugin-jenkins-common":"^0.1.29"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.2.5","@types/jest":"^29.5.13","@backstage/cli":"^0.27.0","@types/jenkins":"^1.0.0","@types/supertest":"^6.0.0","@types/node-fetch":"^2.5.12","@backstage/backend-defaults":"^0.4.3","@backstage/backend-test-utils":"^0.5.0","@backstage/plugin-auth-backend":"^0.23.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-jenkins-backend_0.8.0_1729843779424_0.4002060742439044","host":"s3://npm-registry-packages"}},"0.9.0":{"name":"@binhnt83/plugin-jenkins-backend","version":"0.9.0","license":"Apache-2.0","_id":"@binhnt83/plugin-jenkins-backend@0.9.0","maintainers":[{"name":"binhnt83","email":"thanhbinh.uet@gmail.com"}],"homepage":"https://backstage.io","bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"dist":{"shasum":"9253c0bb56f73fada9a2ee371f2c3a31366fdecb","tarball":"https://registry.npmjs.org/@binhnt83/plugin-jenkins-backend/-/plugin-jenkins-backend-0.9.0.tgz","fileCount":6,"integrity":"sha512-wVDiBX88fVzz9ybRMEBZwh+mvGeqdkC1leKfyc2Gb5SHjD2e6L4dGZ5tcLfYcZHsvTaBKmJSpRx1GL+B4/LvEg==","signatures":[{"sig":"MEUCIQCVC/glqT3Femer8rY4x/kg/xLByuU5ezChvrmWg8jH/QIgMpCy49fxEz2ee7rwbsNh4TTRUWQia490ULHblAUJvEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":131273},"main":"src/index.ts","types":"src/index.ts","gitHead":"3238c754009e8ecb947fd0f505a6dc19e82bde95","scripts":{"lint":"backstage-cli package lint","test":"jest","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":"binhnt83","email":"thanhbinh.uet@gmail.com"},"backstage":{"role":"backend-plugin","pluginId":"jenkins","pluginPackages":["@backstage-community/plugin-jenkins","@backstage-community/plugin-jenkins-backend","@backstage-community/plugin-jenkins-common"]},"repository":{"url":"git+https://github.com/backstage/community-plugins.git","type":"git","directory":"workspaces/jenkins/plugins/jenkins-backend"},"_npmVersion":"10.8.2","description":"BinhNT83 Vingroup JSC custom Backstage backend plugin that integrates towards Jenkins","directories":{},"_nodeVersion":"20.17.0","configSchema":"config.d.ts","dependencies":{"yn":"^4.0.0","express":"^4.17.1","jenkins":"^1.0.0","supertest":"^7.0.0","node-fetch":"^2.6.7","@types/express":"^4.17.6","@backstage/config":"^1.2.0","@backstage/errors":"^1.2.4","express-promise-router":"^4.1.0","@backstage/catalog-model":"^1.6.0","@backstage/backend-common":"^0.24.0","@backstage/catalog-client":"^1.6.6","@backstage/backend-plugin-api":"^0.8.0","@backstage/plugin-catalog-node":"^1.12.5","@backstage/plugin-permission-node":"^0.8.1","@backstage/plugin-permission-common":"^0.8.1","@backstage-community/plugin-jenkins-common":"^0.1.29"},"publishConfig":{"main":"dist/index.cjs.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.2.5","@types/jest":"^29.5.13","@backstage/cli":"^0.27.0","@types/jenkins":"^1.0.0","@types/supertest":"^6.0.0","@types/node-fetch":"^2.5.12","@backstage/backend-defaults":"^0.4.3","@backstage/backend-test-utils":"^0.5.0","@backstage/plugin-auth-backend":"^0.23.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-jenkins-backend_0.9.0_1730356965626_0.14822524068563925","host":"s3://npm-registry-packages"}},"0.10.0":{"name":"@binhnt83/plugin-jenkins-backend","version":"0.10.0","description":"BinhNT83 Vingroup JSC custom Backstage backend plugin that integrates towards Jenkins","backstage":{"role":"backend-plugin","pluginId":"jenkins","pluginPackages":["@backstage-community/plugin-jenkins","@backstage-community/plugin-jenkins-backend","@backstage-community/plugin-jenkins-common"]},"publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"homepage":"https://backstage.io","repository":{"type":"git","url":"git+https://github.com/backstage/community-plugins.git","directory":"workspaces/jenkins/plugins/jenkins-backend"},"license":"Apache-2.0","main":"src/index.ts","types":"src/index.ts","scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"jest"},"dependencies":{"@backstage-community/plugin-jenkins-common":"^0.1.29","@backstage/backend-common":"^0.24.0","@backstage/backend-plugin-api":"^0.8.0","@backstage/catalog-client":"^1.6.6","@backstage/catalog-model":"^1.6.0","@backstage/config":"^1.2.0","@backstage/errors":"^1.2.4","@backstage/plugin-catalog-node":"^1.12.5","@backstage/plugin-permission-common":"^0.8.1","@backstage/plugin-permission-node":"^0.8.1","@types/express":"^4.17.6","express":"^4.17.1","express-promise-router":"^4.1.0","jenkins":"^1.0.0","node-fetch":"^2.6.7","supertest":"^7.0.0","yn":"^4.0.0"},"devDependencies":{"@backstage/backend-defaults":"^0.4.3","@backstage/backend-test-utils":"^0.5.0","@backstage/cli":"^0.27.0","@backstage/plugin-auth-backend":"^0.23.0","@backstage/plugin-auth-backend-module-guest-provider":"^0.2.0","@types/jenkins":"^1.0.0","@types/jest":"^29.5.13","@types/node-fetch":"^2.5.12","@types/supertest":"^6.0.0","jest":"^29.7.0","ts-jest":"^29.2.5"},"configSchema":"config.d.ts","_id":"@binhnt83/plugin-jenkins-backend@0.10.0","gitHead":"812bd1476f1a3e7b7d4dfb95c4b15d003c996359","bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-CAV9cppMunAXUBvhB5Go5lRGiT5KpcrLSx1rWsYtK1IchU6A+lY2IiX9Qkrw4yFrMgHZpkCbaTyPNbPPU5vWHg==","shasum":"64007c0311b7c34033156fb51c318819f7826491","tarball":"https://registry.npmjs.org/@binhnt83/plugin-jenkins-backend/-/plugin-jenkins-backend-0.10.0.tgz","fileCount":6,"unpackedSize":131274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGjeR72nsSNvkMtgN7aCYp0w7S9SgP6IXWUWFQBpRkE3AiADLPRIRjXMYA75q5Q6x5ofCIizqRdTYzHichTTfTEcTA=="}]},"_npmUser":{"name":"binhnt83","email":"thanhbinh.uet@gmail.com"},"directories":{},"maintainers":[{"name":"binhnt83","email":"thanhbinh.uet@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/plugin-jenkins-backend_0.10.0_1730449874369_0.2661271350195842"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-25T07:51:21.489Z","modified":"2024-11-01T08:31:14.722Z","0.7.0":"2024-10-25T07:51:21.772Z","0.8.0":"2024-10-25T08:09:39.605Z","0.9.0":"2024-10-31T06:42:45.915Z","0.10.0":"2024-11-01T08:31:14.577Z"},"bugs":{"url":"https://github.com/backstage/community-plugins/issues"},"license":"Apache-2.0","homepage":"https://backstage.io","repository":{"type":"git","url":"git+https://github.com/backstage/community-plugins.git","directory":"workspaces/jenkins/plugins/jenkins-backend"},"description":"BinhNT83 Vingroup JSC custom Backstage backend plugin that integrates towards Jenkins","maintainers":[{"name":"binhnt83","email":"thanhbinh.uet@gmail.com"}],"readme":"# Jenkins Plugin (Alpha)\n\nWelcome to the Jenkins backend plugin! Website: [https://jenkins.io/](https://jenkins.io/)\n\nThis is the backend half of the 2 Jenkins plugins and is responsible for:\n\n- finding an appropriate instance of Jenkins for an entity\n- finding the appropriate job(s) on that instance for an entity\n- connecting to Jenkins and gathering data to present to the frontend\n\n## New Backend System\n\nThe jenkins backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up:\n\nIn your `packages/backend/src/index.ts` make the following changes:\n\n```diff\n  import { createBackend } from '@backstage/backend-defaults';\n  const backend = createBackend();\n  // ... other feature additions\n  backend.add(import('@backstage-community/plugin-jenkins-backend'));\n  backend.start();\n```\n\n## Integrating into a backstage instance\n\nThis plugin needs to be added to an existing backstage instance.\n\n```bash\n# From your Backstage root directory\nyarn --cwd packages/backend add @backstage-community/plugin-jenkins-backend\n```\n\nTypically, this means creating a `src/plugins/jenkins.ts` file and adding a reference to it to `src/index.ts`\n\n### jenkins.ts\n\n```typescript\nimport {\n  createRouter,\n  DefaultJenkinsInfoProvider,\n} from '@backstage-community/plugin-jenkins-backend';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport { Router } from 'express';\nimport { PluginEnvironment } from '../types';\n\nexport default async function createPlugin(\n  env: PluginEnvironment,\n): Promise<Router> {\n  const catalog = new CatalogClient({\n    discoveryApi: env.discovery,\n  });\n\n  return await createRouter({\n    logger: env.logger,\n    jenkinsInfoProvider: DefaultJenkinsInfoProvider.fromConfig({\n      config: env.config,\n      catalog,\n    }),\n    permissions: env.permissions,\n  });\n}\n```\n\n### src/index.ts\n\n```diff\ndiff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts\nindex f2b14b2..2c64f47 100644\n--- a/packages/backend/src/index.ts\n+++ b/packages/backend/src/index.ts\n@@ -22,6 +22,7 @@ import { Config } from '@backstage/config';\n import app from './plugins/app';\n+import jenkins from './plugins/jenkins';\n import scaffolder from './plugins/scaffolder';\n@@ -56,6 +57,7 @@ async function main() {\n   const authEnv = useHotMemoize(module, () => createEnv('auth'));\n+  const jenkinsEnv = useHotMemoize(module, () => createEnv('jenkins'));\n   const proxyEnv = useHotMemoize(module, () => createEnv('proxy'));\n@@ -63,6 +65,7 @@ async function main() {\n\n   const apiRouter = Router();\n   apiRouter.use('/catalog', await catalog(catalogEnv));\n+  apiRouter.use('/jenkins', await jenkins(jenkinsEnv));\n   apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));\n```\n\nThis plugin must be provided with a JenkinsInfoProvider, this is a strategy object for finding the Jenkins instance and job for an entity.\n\nThere is a standard one provided, but the Integrator is free to build their own.\n\n### DefaultJenkinsInfoProvider\n\nAllows configuration of either a single or multiple global Jenkins instances and annotating entities with the job name on that instance (and optionally the name of the instance).\n\n#### Example - Single global instance\n\nThe following will look for jobs for this entity at `https://jenkins.example.com/job/teamA/job/artistLookup-build`\n\nConfig\n\n```yaml\njenkins:\n  baseUrl: https://jenkins.example.com\n  username: backstage-bot\n  projectCountLimit: 100\n  apiKey: 123456789abcdef0123456789abcedf012\n  # optionally add extra headers\n  # extraRequestHeaders:\n  #   extra-header: my-value\n```\n\nCatalog\n\n```yaml\napiVersion: backstage.io/v1alpha1\nkind: Component\nmetadata:\n  name: artist-lookup\n  annotations:\n    'jenkins.io/job-full-name': teamA/artistLookup-build\n```\n\nThe `projectCountLimit` is optional and if not set, the default limit is 50.\nThe old annotation name of `jenkins.io/github-folder` is equivalent to `jenkins.io/job-full-name`\n\n#### Example - Multiple global instances\n\nThe following will look for jobs for this entity at `https://jenkins-foo.example.com/job/teamA/job/artistLookup-build`\n\nConfig\n\n```yaml\njenkins:\n  instances:\n    - name: default\n      baseUrl: https://jenkins.example.com\n      username: backstage-bot\n      projectCountLimit: 100\n      apiKey: 123456789abcdef0123456789abcedf012\n    - name: departmentFoo\n      baseUrl: https://jenkins-foo.example.com\n      username: backstage-bot\n      projectCountLimit: 100\n      apiKey: 123456789abcdef0123456789abcedf012\n```\n\nCatalog\n\n```yaml\napiVersion: backstage.io/v1alpha1\nkind: Component\nmetadata:\n  name: artist-lookup\n  annotations:\n    'jenkins.io/job-full-name': departmentFoo:teamA/artistLookup-build\n```\n\nIf the `departmentFoo:` part is omitted, the default instance will be assumed.\n\nThe following config is an equivalent (but less clear) version of the above:\n\n```yaml\njenkins:\n  baseUrl: https://jenkins.example.com\n  username: backstage-bot\n  apiKey: 123456789abcdef0123456789abcedf012\n  instances:\n    - name: departmentFoo\n      baseUrl: https://jenkins-foo.example.com\n      username: backstage-bot\n      projectCountLimit: 100\n      apiKey: 123456789abcdef0123456789abcedf012\n```\n\n#### Example - Override Base Url from an Entity\n\nThe following will show you how to override a base url defined in the Config with a value from the Catalog. allowedBaseUrlOverrideRegex must be a regex string in the config, which will check if the sent in url matches that regex for override.\n\nThe check for the regex is to add a security check to make sure no malicious urls were sent to connect the plugin.\n\nConfig\n\n```yaml\njenkins:\n  instances:\n    - name: departmentFoo\n      baseUrl: https://departmentFoo.example.com\n      username: backstage-bot\n      projectCountLimit: 100\n      apiKey: 123456789abcdef0123456789abcedf012\n      allowedBaseUrlOverrideRegex: https://.*\\.example\\.com\n```\n\nCatalog\n\n```yaml\napiVersion: backstage.io/v1alpha1\nkind: Component\nmetadata:\n  name: artist-lookup\n  annotations:\n    'jenkins.io/job-full-name': departmentFoo:teamA/artistLookup-build\n    'jenkins.io/override-base-url': 'https://other.example.com'\n```\n\nThis will set the instance's base url to 'https://other.example.com' when loading the configuration. It will verify first if the url\nsent in is not null, along with the regex string list, and then compares the url to all regex strings to make sure one of them match.\n\nThis use case is for Jenkins systems where there are a lot of Jenkins instances configured from a base instance, which share the same API keys. Therefore a user does not have to define all of the instances here, but in the catalog for ease of use.\n\n### Custom JenkinsInfoProvider\n\nAn example of a bespoke JenkinsInfoProvider which uses an organisation specific annotation to look up the Jenkins info (including jobFullName):\n\n```typescript\nclass AcmeJenkinsInfoProvider implements JenkinsInfoProvider {\n  constructor(private readonly catalog: CatalogClient) {}\n\n  async getInstance(opt: {\n    entityRef: EntityName;\n    jobFullName?: string;\n  }): Promise<JenkinsInfo> {\n    const PAAS_ANNOTATION = 'acme.example.com/paas-project-name';\n\n    // lookup pass-project-name from entity annotation\n    const entity = await this.catalog.getEntityByRef(opt.entityRef);\n    if (!entity) {\n      throw new Error(\n        `Couldn't find entity with name: ${stringifyEntityRef(opt.entityRef)}`,\n      );\n    }\n\n    const paasProjectName = entity.metadata.annotations?.[PAAS_ANNOTATION];\n    if (!paasProjectName) {\n      throw new Error(\n        `Couldn't find paas annotation (${PAAS_ANNOTATION}) on entity with name: ${stringifyEntityRef(\n          opt.entityRef,\n        )}`,\n      );\n    }\n\n    // lookup department and team for paas project name\n    const { team, dept } = this.lookupPaasInfo(paasProjectName);\n\n    const baseUrl = `https://jenkins-${dept}.example.com/`;\n    const jobFullName = `${team}/${paasProjectName}`;\n    const username = 'backstage-bot';\n    const projectCountLimit = 100;\n    const apiKey = this.getJenkinsApiKey(paasProjectName);\n    const creds = btoa(`${username}:${apiKey}`);\n\n    return {\n      baseUrl,\n      headers: {\n        Authorization: `Basic ${creds}`,\n      },\n      jobFullName,\n    };\n  }\n\n  private lookupPaasInfo(_: string): { team: string; dept: string } {\n    // Mock implementation, this would get info from the paas system somehow in reality.\n    return {\n      team: 'teamA',\n      dept: 'DepartmentFoo',\n    };\n  }\n\n  private getJenkinsApiKey(_: string): string {\n    // Mock implementation, this would get info from the paas system somehow in reality.\n    return '123456789abcdef0123456789abcedf012';\n  }\n}\n```\n\nNo config would be needed if using this JenkinsInfoProvider\n\nA Catalog entity of the following will look for jobs for this entity at `https://jenkins-departmentFoo.example.com/job/teamA/job/artistLookupService`\n\n```yaml\napiVersion: backstage.io/v1alpha1\nkind: Component\nmetadata:\n  name: artist-lookup\n  annotations:\n    'acme.example.com/paas-project-name': artistLookupService\n```\n\n## Jenkins' terminology notes\n\nThe domain model for Jenkins is not particularly clear but for the purposes of this plugin the following model has been assumed:\n\nJenkins contains a tree of *job*s which have children of either; other *job*s (making it a _folder_) or *build*s (making it a _project_).\nConcepts like _pipeline_ and *view*s are meaningless (pipelines are just jobs for our purposes, views are (as the name suggests) just views of subsets of jobs)\n\nA _job full name_ is a slash separated list of the names of the job, and the folders which contain it. For example `teamA/artistLookupService/develop`, and the same way that a filesystem path has folders and file names.\n","readmeFilename":"README.md"}