Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vars:
- changelog
- confluence
- rag-ai
- tech-insights
- time-saver
YARN_VERSION: 4.9.1

Expand Down
8 changes: 8 additions & 0 deletions workspaces/tech-insights/.changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions workspaces/tech-insights/.changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"privatePackages": {
"tag": false,
"version": false
}
}
5 changes: 5 additions & 0 deletions workspaces/tech-insights/.changeset/plain-spoons-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alithya-oss/backstage-plugin-tech-insights-backend-module-catalog-entities': minor
---

Initial version of the API entities definition fact retriever
8 changes: 8 additions & 0 deletions workspaces/tech-insights/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
.yarn/cache
.yarn/install-state.gz
node_modules
packages/*/src
packages/*/node_modules
plugins
*.local.yaml
1 change: 1 addition & 0 deletions workspaces/tech-insights/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playwright.config.ts
3 changes: 3 additions & 0 deletions workspaces/tech-insights/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
root: true,
};
53 changes: 53 additions & 0 deletions workspaces/tech-insights/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# macOS
.DS_Store

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage directory generated when running tests with coverage
coverage

# Dependencies
node_modules/

# Yarn files
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Node version directives
.nvmrc

# dotenv environment variables file
.env
.env.test

# Build output
dist
dist-types

# Temporary change files created by Vim
*.swp

# MkDocs build output
site

# Local configuration files
*.local.yaml

# Sensitive credentials
*-credentials.yaml

# vscode database functionality support files
*.session.sql

# E2E test reports
e2e-test-report/
4 changes: 4 additions & 0 deletions workspaces/tech-insights/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
dist-types
coverage
.vscode
948 changes: 948 additions & 0 deletions workspaces/tech-insights/.yarn/releases/yarn-4.9.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions workspaces/tech-insights/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.9.1.cjs
10 changes: 10 additions & 0 deletions workspaces/tech-insights/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# [Backstage](https://backstage.io)

This is your newly scaffolded Backstage App, Good Luck!

To start the app, run:

```sh
yarn install
yarn start
```
55 changes: 55 additions & 0 deletions workspaces/tech-insights/app-config.production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
app:
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
baseUrl: http://localhost:7007

backend:
# Note that the baseUrl should be the URL that the browser and other clients
# should use when communicating with the backend, i.e. it needs to be
# reachable not just from within the backend host, but from all of your
# callers. When its value is "http://localhost:7007", it's strictly private
# and can't be reached by others.
baseUrl: http://localhost:7007
# The listener can also be expressed as a single <host>:<port> string. In this case we bind to
# all interfaces, the most permissive setting. The right value depends on your specific deployment.
listen: ':7007'

# config options: https://node-postgres.com/apis/client
database:
client: pg
connection:
host: ${POSTGRES_HOST}
port: ${POSTGRES_PORT}
user: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
# https://node-postgres.com/features/ssl
# you can set the sslmode configuration option via the `PGSSLMODE` environment variable
# see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
# ssl:
# ca: # if you have a CA file and want to verify it you can uncomment this section
# $file: <file-path>/ca/server.crt

auth:
providers:
guest: {}

catalog:
# Overrides the default list locations from app-config.yaml as these contain example data.
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details
# on how to get entities into the catalog.
locations:
# Local example data, replace this with your production config, these are intended for demo use only.
# File locations are relative to the backend process, typically in a deployed context, such as in a Docker container, this will be the root
- type: file
target: ./examples/entities.yaml

# Local example template
- type: file
target: ./examples/template/template.yaml
rules:
- allow: [Template]

# Local example organizational data
- type: file
target: ./examples/org.yaml
rules:
- allow: [User, Group]
213 changes: 213 additions & 0 deletions workspaces/tech-insights/app-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
app:
title: Scaffolded Backstage App
baseUrl: http://localhost:3000

organization:
name: My Company

backend:
# Used for enabling authentication, secret is shared by all backend plugins
# See https://backstage.io/docs/auth/service-to-service-auth for
# information on the format
# auth:
# keys:
# - secret: ${BACKEND_SECRET}
baseUrl: http://localhost:7007
listen:
port: 7007
# Uncomment the following host directive to bind to specific interfaces
# host: 127.0.0.1
csp:
connect-src: ["'self'", 'http:', 'https:']
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
cors:
origin: http://localhost:3000
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true
# This is for local development only, it is not recommended to use this in production
# The production database configuration is stored in app-config.production.yaml
database:
client: better-sqlite3
connection: ':memory:'
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir

integrations:
github:
- host: github.com
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
# about setting up the GitHub integration here: https://backstage.io/docs/integrations/github/locations#configuration
token: ${GITHUB_TOKEN}
### Example for how to add your GitHub Enterprise instance using the API:
# - host: ghe.example.net
# apiBaseUrl: https://ghe.example.net/api/v3
# token: ${GHE_TOKEN}

proxy:
### Example for how to add a proxy endpoint for the frontend.
### A typical reason to do this is to handle HTTPS and CORS for internal services.
# endpoints:
# '/test':
# target: 'https://example.com'
# changeOrigin: true

# Reference documentation http://backstage.io/docs/features/techdocs/configuration
# Note: After experimenting with basic setup, use CI/CD to generate docs
# and an external cloud storage when deploying TechDocs for production use-case.
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
techdocs:
builder: 'local' # Alternatives - 'external'
generator:
runIn: 'docker' # Alternatives - 'local'
publisher:
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.

auth:
# see https://backstage.io/docs/auth/ to learn about auth providers
providers:
# See https://backstage.io/docs/auth/guest/provider
guest: {}

scaffolder:
# see https://backstage.io/docs/features/software-templates/configuration for software template options

catalog:
import:
entityFilename: catalog-info.yaml
pullRequestBranchName: backstage-integration
rules:
- allow: [Component, System, API, Resource, Location]
locations:
# Local example data, file locations are relative to the backend process, typically `packages/backend`
- type: file
target: ../../examples/entities.yaml

# Local example template
- type: file
target: ../../examples/template/template.yaml
rules:
- allow: [Template]

# Local example organizational data
- type: file
target: ../../examples/org.yaml
rules:
- allow: [User, Group]

## Uncomment these lines to add more example data
# - type: url
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml

## Uncomment these lines to add an example org
# - type: url
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
# rules:
# - allow: [User, Group]
# Experimental: Always use the search method in UrlReaderProcessor.
# New adopters are encouraged to enable it as this behavior will be the default in a future release.
useUrlReadersSearch: true

kubernetes:
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options

# see https://backstage.io/docs/permissions/getting-started for more on the permission framework
permission:
# setting this to `false` will disable permissions
enabled: true

techInsights:
factRetrievers:
entityOwnershipFactRetriever:
cadence: '*/15 * * * *'
lifecycle:
timeToLive:
weeks: 2
entityMetadataFactRetriever:
cadence: '*/15 * * * *'
lifecycle:
timeToLive:
weeks: 2
techdocsFactRetriever:
cadence: '*/15 * * * *'
lifecycle:
timeToLive:
weeks: 2
apiDefinitionFactRetriever:
cadence: '*/15 * * * *'
lifecycle:
timeToLive:
weeks: 2
resourceTypeFactRetriever:
cadence: '*/15 * * * *'
lifecycle:
timeToLive:
weeks: 2
factChecker:
checks:
groupOwnerCheck:
type: json-rules-engine
name: Group Owner Check
description: Verifies that a group has been set as the spec.owner for this entity
factIds:
- entityOwnershipFactRetriever
rule:
conditions:
all:
- fact: hasGroupOwner
operator: equal
value: true
metadata:
category: Ownership
rank: 1
solution: Add a group owner to the `spec.owner` field in the entity YAML definition

titleCheck:
type: json-rules-engine
name: Title Check
description: Verifies that a Title, used to improve readability, has been set for this entity
factIds:
- entityMetadataFactRetriever
rule:
conditions:
all:
- fact: hasTitle
operator: equal
value: true
metadata:
category: Ownership
rank: 1
solution: Add a group owner to the `spec.title` field in the entity YAML definition

techdocsCheck:
type: json-rules-engine
name: TechDocs Check
description: Verifies that TechDocs has been enabled for this entity
factIds:
- techdocsFactRetriever
rule:
conditions:
all:
- fact: hasAnnotationBackstageIoTechdocsRef
operator: equal
value: true
metadata:
category: Maintainability
rank: 2
solution: Add a group owner to the `backstage.io/techdocs-ref` field in the entity YAML definition

apiDefinitionCheck:
type: json-rules-engine
name: API definition Check
description: Verifies that a API has a definition set
factIds:
- apiDefinitionFactRetriever
rule:
conditions:
all:
- fact: hasDefinition
operator: equal
value: true
metadata:
category: Integration
rank: 2
solution: Add a group owner to the `spec.definition` field in the entity YAML definition
Loading
Loading