Skip to content

Commit

Permalink
Merge pull request backstage#558 from alithya-oss/main
Browse files Browse the repository at this point in the history
New plugin - Confluence
  • Loading branch information
awanlin authored Aug 8, 2024
2 parents 0ffe5fb + 1b60d97 commit 7a131e0
Show file tree
Hide file tree
Showing 77 changed files with 35,384 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ yarn.lock @backstage/community-plugins
/workspaces/analytics @backstage/community-plugins-maintainers @jmezach
/workspaces/bitrise @backstage/community-plugins-maintainers @backstage/sda-se-reviewers
/workspaces/code-coverage @backstage/community-plugins-maintainers @alde
/workspaces/confluence @backstage/community-plugins-maintainers @fjudith
/workspaces/cost-insights @backstage/community-plugins-maintainers @backstage/silver-lining
/workspaces/entity-feedback @backstage/community-plugins-maintainers @kuangp
/workspaces/explore @backstage/community-plugins-maintainers @backstage/sda-se-reviewers
Expand Down
8 changes: 8 additions & 0 deletions workspaces/confluence/.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)
10 changes: 10 additions & 0 deletions workspaces/confluence/.changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
6 changes: 6 additions & 0 deletions workspaces/confluence/.changeset/shy-readers-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@backstage-community/plugin-search-backend-module-confluence-collator': minor
'@backstage-community/plugin-confluence': minor
---

Initial plugin version. A copy of its original [repo](https://github.com/K-Phoen/backstage-plugin-confluence) updated to support the new backend system and compatible with the configuration specs of the [Confluence to Markdown action](https://github.com/backstage/backstage/tree/master/plugins/scaffolder-backend-module-confluence-to-markdown) scaffolder plugin.
8 changes: 8 additions & 0 deletions workspaces/confluence/.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/confluence/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playwright.config.ts
3 changes: 3 additions & 0 deletions workspaces/confluence/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
root: true,
};
54 changes: 54 additions & 0 deletions workspaces/confluence/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# macOS
.DS_Store

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

# Coverage directory generated when running tests with coverage
coverage

# Dependencies
node_modules/

# Yarn 3 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/confluence/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
dist-types
coverage
.vscode
10 changes: 10 additions & 0 deletions workspaces/confluence/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 dev
```
39 changes: 39 additions & 0 deletions workspaces/confluence/app-config.production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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: null

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: []
58 changes: 58 additions & 0 deletions workspaces/confluence/app-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
app:
title: Confluence Example App
baseUrl: http://localhost:3000

organization:
name: Confluence Example

backend:
baseUrl: http://localhost:7007
listen:
port: 7007
csp:
connect-src: ["'self'", 'http:', 'https:']
cors:
origin: http://localhost:3000
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true
database:
client: better-sqlite3
connection: ':memory:'

reading:
allow:
- host: dac-static.atlassian.com
- host: developer.atlassian.com

integrations:
github:
- host: github.com
token: ${GITHUB_TOKEN}

techdocs:
builder: 'local'
generator:
runIn: 'local'
publisher:
type: 'local'

auth:
providers:
guest: {}

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 organizational data
- type: file
target: ../../examples/org.yaml
rules:
- allow: [User, Group]
3 changes: 3 additions & 0 deletions workspaces/confluence/backstage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.29.2"
}
13 changes: 13 additions & 0 deletions workspaces/confluence/catalog-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: confluence-example
description: An example of a Backstage application.
# Example for optional annotations
# annotations:
# github.com/project-slug: backstage/backstage
# backstage.io/techdocs-ref: dir:.
spec:
type: website
owner: john@example.com
lifecycle: experimental
100 changes: 100 additions & 0 deletions workspaces/confluence/examples/entities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
title: Confluence
name: confluence
spec:
owner: atlassian
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
title: Confluence Cloud
name: confluence-cloud
links:
- url: https://developer.atlassian.com/cloud/confluence
title: Developer documentation
icon: docs
spec:
type: website
lifecycle: production
owner: atlassian
system: confluence
providesApis:
- confluence-cloud-rest-api
- confluence-cloud-rest-api-v2
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
title: Confluence Cloud REST API
name: confluence-cloud-rest-api
links:
- url: https://developer.atlassian.com/cloud/confluence
title: Developer documentation
icon: docs
spec:
type: openapi
lifecycle: production
owner: atlassian
system: confluence
definition:
$text: https://dac-static.atlassian.com/cloud/confluence/swagger.v3.json
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
title: Confluence Cloud REST API v2
name: confluence-cloud-rest-api-v2
links:
- url: https://developer.atlassian.com/cloud/confluence
title: Developer documentation
icon: docs
spec:
type: openapi
lifecycle: production
owner: atlassian
system: confluence
definition:
$text: https://dac-static.atlassian.com/cloud/confluence/openapi-v2.v3.json
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
title: Confluence Data Center
name: confluence-server
links:
- url: https://developer.atlassian.com/server/confluence
title: Developer documentation
icon: docs
spec:
type: website
lifecycle: production
owner: atlassian
system: confluence
providesApis:
- confluence-server-rest-api
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
title: Confluence Data Center REST API
name: confluence-server-rest-api
links:
- url: https://developer.atlassian.com/server/confluence
title: Developer documentation
icon: docs
spec:
type: openapi
lifecycle: production
owner: atlassian
system: confluence
definition:
$text: https://dac-static.atlassian.com/server/confluence/9.0.0.swagger.v3.json
18 changes: 18 additions & 0 deletions workspaces/confluence/examples/org.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: guest
spec:
memberOf: [atlassian]
---
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
title: Atlasian
name: atlassian
spec:
type: team
children: []
Loading

0 comments on commit 7a131e0

Please sign in to comment.