Skip to content

Upgrade to latest Backstage version and add some more infrastructure #81

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space

[*.html]
indent_size = 2

[*.{ts,json,js,tsx,jsx}]
indent_size = 2

[*.md]
indent_size = 2

[Dockerfile]
indent_size = 2

[*.{yml,yaml}]
indent_size = 2
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
rules: {
'@backstage/no-top-level-material-ui-4-imports': 'error',
},
});
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
140 changes: 140 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: CI

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# This step only runs yarn install to make sure that an exact match is available
# in the cache. The two following verify and tests jobs then always install from cache.
install:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]

env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192

name: Install ${{ matrix.node-version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@v4

- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: yarn install
uses: backstage/actions/yarn-install@main
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

# The verify jobs runs all the verification that doesn't require a
# diff towards master, since it takes some time to fetch that.
verify:
runs-on: ubuntu-latest

needs: install

strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]

env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192

name: Verify ${{ matrix.node-version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@v4

- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: yarn install
uses: backstage/actions/yarn-install@main
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

- name: check for missing repo fixes
run: yarn fix --check

- name: type checking and declarations
run: yarn tsc:full

- name: prettier
run: yarn prettier:check

- name: build all packages
run: yarn backstage-cli repo build --all

- name: ensure clean working directory
run: |
if files=$(git ls-files --exclude-standard --others --modified) && [[ -z "$files" ]]; then
exit 0
else
echo ""
echo "Working directory has been modified:"
echo ""
git status --short
echo ""
exit 1
fi
test:
runs-on: ubuntu-latest

needs: install

strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]

env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192

name: Test ${{ matrix.node-version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@v4

- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth

- name: yarn install
uses: backstage/actions/yarn-install@main
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}

- name: run tests
run: yarn test
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
validate-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
Expand Down
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ dist
# TernJS port file
.tern-port

dist

dist-types

.yarn
# Yarn 3 files
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.yarn
dist
microsite
coverage
*.hbs
templates
api-report.md
api-report-*.md
knip-report.md
cli-report.md
plugins/scaffolder-backend/sample-templates
.vscode
dist-types
.eslintrc.js
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

875 changes: 875 additions & 0 deletions .yarn/releases/yarn-3.8.1.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enableGlobalCache: true

httpTimeout: 300000

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.8.1.cjs
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Now in the below steps, I will assume you are already done with the provider.
```shell
yarn add –cwd packages/app @statusneo/backstage-plugin-github
```

2. add this to the app/src/apis.ts

```javascript
Expand Down Expand Up @@ -55,10 +56,8 @@ import { GithubPullRequestsCard, GithubActionsCard } from '@statusneo/backstage-
5. If you are using a GitHub enterprise edition, you can pass your instance url through app-config.yml

```yaml

gh-plugin:
url: ${GITHUB_ENTERPRISE_URL}

```

Now you are ready to use this Backstage GitHub plugin to make your software management and development cycle a little more hassle-free.
5 changes: 5 additions & 0 deletions app-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
app:
title: 'GitHub plugin'

backend:
baseUrl: localhost:3000
3 changes: 3 additions & 0 deletions backstage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.31.1"
}
Loading