Skip to content

Commit

Permalink
Merge pull request #1 from allegro/feature/initial-setup
Browse files Browse the repository at this point in the history
Initial setup of plugins repository and adding chatBot plugin
  • Loading branch information
ppiwow-apay authored Jan 17, 2025
2 parents 0a7bb5d + d623b65 commit 03df9b0
Show file tree
Hide file tree
Showing 110 changed files with 39,424 additions and 34 deletions.
8 changes: 8 additions & 0 deletions .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 .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playwright.config.ts
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
root: true,
};
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: |
yarn install --immutable
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
./ci/lint.sh
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
typescript_version: [latest]

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: ./ci/test.sh
23 changes: 23 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: NPM Package
on:
release:
types: [created]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: ./ci/build.sh
- run: yarn config set -H 'npmAuthToken' "$NODE_AUTH_TOKEN"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: yarn workspaces foreach --all -v --no-private npm publish --access public --tolerate-republish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54 changes: 54 additions & 0 deletions .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 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/
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn commitlint --edit $1
Empty file added .husky/pre-commit
Empty file.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
dist-types
coverage
.vscode
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

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

yarnPath: .yarn/releases/yarn-4.5.0.cjs
10 changes: 0 additions & 10 deletions CHANGELOG.md

This file was deleted.

40 changes: 19 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@

## Pull requests

* for small changes, no need to add separate issue, defining problem in pull request is enough
* if issue exists, reference it from PR title or description using GitHub magic words like *resolves #issue-number*
* before making significant changes, please contact us via issues to discuss your plans and decrease number of changes after Pull Request is created
* create pull requests to **main** branch
* recommended to use conventional commits standard
* when updating a package, make sure to:
* update its README.md
* update its CHANGELOG.md
* update its version
* consider presenting usage in plugin `Readme`
* add tests
* when creating a new package, make sure to:
* maintain the repo structure (see existing packages)
* add code analyzers
* create the package's README.md
* initialize the package's CHANGELOG.md
* add tests
* consider presenting usage in plugin `Readme`
* reference the package from README.md in repo's root
- for small changes, no need to add separate issue, defining problem in pull request is enough
- if issue exists, reference it from PR title or description using GitHub magic words like _resolves #issue-number_
- before making significant changes, please contact us via issues to discuss your plans and decrease number of changes after Pull Request is created
- create pull requests to **main** branch
- required to use conventional commits standard
- when updating a package, make sure to:
- update its README.md
- update its CHANGELOG.md
- update its version
- consider presenting usage in plugin `Readme`
- add tests
- when creating a new package, make sure to:
- maintain the repo structure (see existing packages)
- create the package's README.md
- initialize the package's CHANGELOG.md
- add tests
- consider presenting usage in plugin `Readme`

## Coding style

The coding style is guarded by the analyzers (such as prettier and lint).
Make sure to follow the defined standards.
The coding style is guarded by the analyzers (such as prettier and lint).
Make sure to follow the defined standards.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Allegro Backstage Plugins

TODO
## Getting started

Setup local environement:

```sh
yarn install
yarn husky init
```

## [Backstage](https://backstage.io)

This is your newly scaffolded Backstage App, Good Luck!

To start the app, run:

```sh
yarn install
yarn dev
```

## Add new package

We want to keep each package in dedicated folder under `./plugins`. Additionaly we based scripts on `backstage-cli` that creates plugins directly in `./plugins`. Therefore steps to create new package are:

1. type `yarn new` and follow wizard
2. move newly created plugin to dedicated plugin folder (existing or create new one)
3. TODO

## License

Expand All @@ -16,4 +42,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion ap-catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: allegroBackstagePlugins
description: "This repo contains Backstage plugins delivered by Allegro"
description: 'This repo contains Backstage plugins delivered by Allegro'
title: Allegro Backstage Plugins
annotations:
backstage.io/techdocs-ref: dir:.
Expand Down
56 changes: 56 additions & 0 deletions app-config.production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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:
environment: production
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]
Loading

0 comments on commit 03df9b0

Please sign in to comment.