Skip to content

Commit

Permalink
Updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fokolo committed Oct 1, 2024
1 parent e3f35bf commit aab26cb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 50 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Port Backstage Plugins Workspace

This workspace contains the Port Backstage plugins, which integrate Port's functionality into your Backstage instance.

## Structure

The workspace is organized into two main packages:

1. `backend-plugin`: Contains the backend implementation of the Port Backstage plugin.
2. `frontend-plugin`: Contains the frontend implementation of the Port Backstage plugin.

## Getting Started

## Development

To integrate the Port Backstage plugins into your Backstage deployment, follow these steps:

1. Install the backend and frontend plugins:

```bash
# In your Backstage root directory
yarn add --cwd packages/backend @port-labs/backstage-plugin-port-backend
yarn add --cwd packages/app @port-labs/backstage-plugin-port
```

2. Configure the `app-config.yaml` file:

Add the following configuration to your `app-config.yaml`:

```yaml
port:
api:
baseUrl: https://api.getport.io # Replace with your Port API base URL if different
auth:
clientId: YOUR_CLIENT_ID
clientSecret: YOUR_CLIENT_SECRET
```
Replace `YOUR_CLIENT_ID` and `YOUR_CLIENT_SECRET` with the actual credentials provided by Port.

3. Follow the specific setup instructions in the README files of the backend and frontend plugins for additional configuration steps.

Please refer to the individual README files in each plugin directory for specific instructions on how to develop, build, and test each plugin.

## Support

If you encounter any issues or have questions, please file an issue on the GitHub repository or contact Port Labs support.
51 changes: 1 addition & 50 deletions frontend-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,7 @@
# port


## Getting started

### Installation
``` bash
yarn --cwd packages/app add @port-/backstage-plugin
```

`/app-config.yaml`

```yaml
proxy:
endpoints:
'/getport':
target: https://api.getport.io/v1
credentials: dangerously-allow-unauthenticated
headers:
Authorization: Bearer ${PORT_TOKEN}
```
`EntityPage.tsx`

```tsx
const websiteEntityPage = (
<EntityLayout>
...
{
['getport.io/Jira_Project'].map(annotation => (
<EntityLayout.Route path={`/port/${annotation}`} title={annotation.split('/')[1]} if={(entity) => !!entity.metadata.annotations?.[annotation]}>
<EntityTabPortContent annotation={annotation} />
</EntityLayout.Route>
))
}
...
</EntityLayout>
);

const serviceEntityPage = (
<EntityLayout>
...
{
['getport.io/Jira_Project'].map(annotation => (
<EntityLayout.Route path={`/port/${annotation}`} title={annotation.split('/')[1]} if={(entity) => !!entity.metadata.annotations?.[annotation]}>
<EntityTabPortContent annotation={annotation} />
</EntityLayout.Route>
))
}
...
</EntityLayout>
);
```
```

TBD

0 comments on commit aab26cb

Please sign in to comment.