forked from janus-idp/backstage-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FLPATH-799 https://issues.redhat.com/browse/FLPATH-799 Signed-off-by: Yaron Dayagi <[email protected]>
- Loading branch information
Showing
8 changed files
with
60 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
name: Test | ||
description: Test Node.js package | ||
inputs: | ||
args: | ||
description: Backstage CLI repo build arguments | ||
default: '@janus-idp/*' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
- name: Setup local Turbo cache | ||
uses: dtinth/setup-github-actions-caching-for-turbo@v1 | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: yarn --prefer-offline --frozen-lockfile | ||
|
||
- name: Run prettier | ||
- name: Start backstage | ||
shell: bash | ||
run: yarn prettier:check | ||
run: yarn install | ||
|
||
- name: Run lint | ||
shell: bash | ||
run: yarn lint --filter=${{ inputs.args }} | ||
- name: Start backstage | ||
uses: ./ | ||
with: | ||
start: yarn start:backstage | ||
wait-on: 'http://localhost:7007' | ||
wait-on-timeout: 600 | ||
|
||
- name: Run tests | ||
- name: Test get notifications | ||
shell: bash | ||
run: yarn test --filter=${{ inputs.args }} | ||
run: curl http://localhost:7007/api/notifications/notifications |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { CatalogClient } from '@backstage/catalog-client'; | ||
import { createRouter } from '@backstage/plugin-notifications-backend'; | ||
|
||
import { Router } from 'express'; | ||
|
||
import { PluginEnvironment } from '../types'; | ||
|
||
export default async function createPlugin( | ||
env: PluginEnvironment, | ||
): Promise<Router> { | ||
const catalogClient = new CatalogClient({ discoveryApi: env.discovery }); | ||
const dbConfig = env.config.getConfig('backend.database'); | ||
return await createRouter({ | ||
logger: env.logger, | ||
dbConfig, | ||
catalogClient, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: User | ||
metadata: | ||
namespace: default | ||
name: guest | ||
spec: | ||
profile: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters