Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New plugin - Confluence #558

Merged
merged 31 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3ee48db
Initial Confluence plugin commit
Jun 11, 2024
de7b5cc
Added Credits to original repository
Jun 11, 2024
d65800f
Updated Confluence frontend plugin name
Jun 11, 2024
9024588
Fixed version and repository
Jun 20, 2024
7446ff0
Added Confluence plugin
fjudith Jul 5, 2024
cf55668
Update workspaces/confluence/package.json
fjudith Jul 5, 2024
d14b3eb
Bump framework version 1.29.2
Jul 25, 2024
70ddbb7
Removed non-required files for plugin development
Jul 25, 2024
394a7a1
Fixed typo
Jul 25, 2024
c95a918
Fixed typos
Jul 25, 2024
fc2f2bf
Added API extractor
Jul 27, 2024
d5fbf31
Updated README
Jul 27, 2024
7cc3c69
Updated README
Jul 27, 2024
48aa90d
Fixed deprecations
Jul 27, 2024
b9cefe4
Added confluence to mardown scaffolder action
Jul 27, 2024
d82b2cf
Added schedule configuration instructions
Jul 27, 2024
6a46925
Added support for basic auth
Jul 27, 2024
cffa169
Fixed auth type
Jul 27, 2024
7e03bb6
Updated changeset
Jul 27, 2024
4353fce
Updated api-reports
Jul 29, 2024
36b7510
Removed Confluence to Markdown sources
Jul 31, 2024
9555d8a
Removed unused backend plugins
Aug 1, 2024
3b2d75d
Removed unused frontend plugins
Aug 3, 2024
b7ee438
Updated example entities to reference Confluence developer resources
Aug 3, 2024
043e94f
Fixed CI errors
Aug 6, 2024
92bf775
Applied Prettier
Aug 6, 2024
4b01840
Rolled-back prettier change
Aug 6, 2024
57f49f8
Fixed backend module api report
Aug 7, 2024
2f7a15a
Fixed frontend plugin api report
Aug 7, 2024
0c459fc
Applied Prettrier
Aug 8, 2024
1b60d97
Fixed pacakge.json
Aug 8, 2024
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 .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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/[email protected]/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: [email protected]
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
Loading