Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ indent_size = 2

[*.{yml,yaml}]
indent_size = 2
indent_style = space
indent_style = space
27 changes: 18 additions & 9 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ on:
description: 'Workspace (this must be a JSON array)'
required: true
type: string
version-bump-type:
description: 'Specifies the type of version update to apply.'
required: true
default: 'minor'
type: choice
options:
- 'major'
- 'minor'
- 'patch'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -31,28 +40,28 @@ jobs:
name: ${{ matrix.workspace }} version:bump
steps:
- name: 'Checkout community-plugins'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 1

# Beginning of yarn setup
- name: use node.js 20.x
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: cache all node_modules
id: cache-modules
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
- name: find location of global yarn cache
id: yarn-cache
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: cache global yarn cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
Expand All @@ -68,7 +77,7 @@ jobs:

- name: 'Set release name'
id: set_release_name
run: node scripts/ci/set-release-name.js ${{ matrix.workspace }}
run: node scripts/ci/set-release-name.js ${{ matrix.workspace }} ${{ inputs.release_line || 'main' }}
- name: 'Configure git'
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand All @@ -88,7 +97,7 @@ jobs:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- name: Run dedupe
working-directory: ./workspaces/${{ matrix.workspace }}
run: yarn dedupe
run: yarn dedupe
- name: 'Check for changes'
id: check_for_changes
run: |
Expand All @@ -103,7 +112,7 @@ jobs:
- name: 'Add changeset'
if: ${{ steps.check_for_changes.outputs.HAS_CHANGES == 1 }}
working-directory: ./workspaces/${{ matrix.workspace }}
run: node ../../scripts/ci/generate-version-bump-changeset.js ${{ steps.set_release_name.outputs.release_version }}
run: node ../../scripts/ci/generate-version-bump-changeset.js ${{ steps.set_release_name.outputs.release_version }} ${{ inputs.version-bump-type || 'minor' }}
- name: 'Commit changes'
if: ${{ steps.check_for_changes.outputs.HAS_CHANGES == 1 }}
run: |
Expand All @@ -115,7 +124,7 @@ jobs:
if: ${{ steps.check_for_changes.outputs.HAS_CHANGES == 1 }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.GH_SERVICE_ACCOUNT_TOKEN}}
script: |
await github.rest.pulls.create({
title: '${{ matrix.workspace }} - version:bump to v${{ steps.set_release_name.outputs.release_version }}',
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,11 @@ site
*-credentials.yaml

# vscode database functionality support files
*.session.sql
*.session.sql.tmp
scripts
.tmp
scripts
.tmp
scripts
.tmp
scripts
2 changes: 1 addition & 1 deletion .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_
_
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn lint-staged
yarn lint-staged
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.tmp
scripts
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ nmMode: hardlinks-local

npmRegistryServer: 'https://registry.npmjs.org/'

yarnPath: .yarn/releases/yarn-4.9.1.cjs
yarnPath: .yarn/releases/yarn-4.9.1.cjs
1 change: 0 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

15 changes: 7 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

# Contributing to `alithya-oss/backstage-plugins`

The `alithya-oss/backstage-plugins` repository is primarily designed as a collaborative space for plugins maintained by Alithya, and contributions expected to break compatiblity with upstream project.
As an example this repository started with the refactoring of the [Confluence Search](https://github.com/K-Phoen/backstage-plugin-confluence) to align the code with the [new backend system](https://backstage.io/docs/backend-system/).

This repository provides to maintainers the tools to manage and publish Backstage plugins in the `
This repository provides to maintainers the tools to manage and publish Backstage plugins in the `

as a collaborative space for Alithya and Backstage community members to host and manage their plugins for Backstage. This repository will provide plugin maintainers with tools for plugin management and publication. By contributing a plugin to this repository, maintainers agree to adhere to specific guidelines and a standardized release process detailed in this guide.
as a collaborative space for Alithya and Backstage community members to host and manage their plugins for Backstage. This repository will provide plugin maintainers with tools for plugin management and publication. By contributing a plugin to this repository, maintainers agree to adhere to specific guidelines and a standardized release process detailed in this guide.

If you have questions or feedback regarding Community Plugins, you can visit the [Community Plugins #general channel](https://discord.com/channels/687207715902193673/1211692810294788126) in the Backstage [Discord](https://discord.gg/backstage-687207715902193673).

Expand Down Expand Up @@ -104,9 +103,9 @@ To create a changeset, follow these steps:

2. Run the following command to create a new changeset:

```bash
$ yarn changeset
```
```bash
$ yarn changeset
```

3. You will be prompted to select the packages and the type of change you are making.

Expand Down Expand Up @@ -204,7 +203,7 @@ cp -r ../existing-plugins/plugins/plugin-name plugins/

8. Update external references to the old plugin location such as documentation to point to the new location in the `backstage/community-plugins` repository.

9. In the original repository, update the plugin to indicate that it has been moved to the `backstage/community-plugins` repository. You may wish to deprecate the old version on npm.
9. In the original repository, update the plugin to indicate that it has been moved to the `backstage/community-plugins` repository. You may wish to deprecate the old version on npm.

## Organization Membership Request for CODEOWNERS

Expand Down Expand Up @@ -305,4 +304,4 @@ Here are a few things that can help as you go through the review process:
- You'll want to make sure all the automated checks are passing as generally the PR won't get a review if something like the CI build is failing
- PRs get automatically assigned so you don't need to ping people, they will be notified and have a process of their own for this
- If you are waiting for a review or mid-review and your PR goes stale one of the easiest ways to clear the stale bot is by simply rebasing your PR
- There are times where you might run into conflict with the `yarn.lock` during a rebase, to help with that make sure your `main` branch is up to date and then in your branch run `git checkout master yarn.lock` from the workspace too and then run `yarn install`, this will get you a conflict free `yarn.lock` file you can commit
- There are times where you might run into conflict with the `yarn.lock` during a rebase, to help with that make sure your `main` branch is up to date and then in your branch run `git checkout master yarn.lock` from the workspace too and then run `yarn install`, this will get you a conflict free `yarn.lock` file you can commit
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

# Alithya-OSS Backstage Plugins

The `alithya-oss/backstage-plugins` repository is a

This repository is a collection of Philips plugins for Backstage. It is a community-driven repository where Philips developers can contribute their plugins to be shared with the rest of the community.
This repository is a collection of Backstage plugins developped from scratch or [hard-forked](#hard-fork-policy) by Alithya. It is a community-driven repository where Alithya's developers can contribute to their plugins that can be shared publicly with the rest of the community.

## Repository layout

Expand Down
55 changes: 44 additions & 11 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,53 @@ tasks:

sync:repo-tools:
summary: Download backstage-community repository tools
vars:
VERSION: main
env:
APP_VERSION: main
cmds:
- mkdir -p .tmp/community-plugins/${APP_VERSION}
- |
APP_VERSION="{{.VERSION}}"
mkdir -p .tmp/community-plugins/${APP_VERSION}
curl -fsSL https://github.com/backstage/community-plugins/archive/refs/heads/${APP_VERSION}.tar.gz \
| tar -xvzf - \
--strip-components=1 \
--directory=.tmp/community-plugins/${APP_VERSION} \
community-plugins-${APP_VERSION/"/"/"-"}/workspaces
| tar -xvzf - \
--strip-components=1 \
--directory=.tmp/community-plugins/${APP_VERSION} \
community-plugins-${APP_VERSION/"/"/"-"}/
- |
rsync -av \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/workspaces/repo-tools \
./workspaces/
cd workspaces/repo-tools
yarn install
yarn lint --fix
- |
rsync -av \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/.husky \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/.yarn \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/scripts \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/.editorconfig \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/.eslintrc.cjs \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/.yarnrc.yml \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/package.json \
.tmp/community-plugins/${APP_VERSION/"/"/"-"}/yarn.lock \
./
- |
sed \
-e "s#backstage/community-plugins#alithya-oss/backstage-plugins#g" \
-e "s#backstage-community/plugins#alithya-oss/backstage-plugins#g" \
-i ./package.json
- |
sed \
-e "s#\(The\s\)Backstage\(\sAuthors\)#\1Alithya\2#g" \
-i ./scripts/templates/copyright-header.txt
- yarn install
- |
cat <<EOF | tee -a .gitignore
.tmp
scripts
EOF
- |
cat <<EOF | tee .prettierignore
.tmp
scripts
EOF
# - yarn prettier:fix
# - |
# cd workspaces/repo-tools
# yarn install --immutable
# yarn lint --fix
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
"packageManager": "[email protected]",
"devDependencies": {
"@backstage-community/cli": "portal:./workspaces/repo-tools/packages/cli",
"@backstage/cli": "^0.27.0",
"@backstage/cli-node": "^0.2.2",
"@backstage/cli": "^0.32.0",
"@backstage/cli-node": "^0.2.13",
"@changesets/parse": "^0.4.0",
"@manypkg/get-packages": "^2.2.2",
"@octokit/rest": "^20.1.1",
"@spotify/eslint-plugin": "^15.0.0",
"@spotify/prettier-config": "^15.0.0",
"array-to-table": "^1.0.1",
"codeowners-utils": "^1.0.2",
"eslint": "^8.6.0",
Expand All @@ -37,7 +36,7 @@
"node-fetch": "^2.6.7",
"prettier": "^2.3.2"
},
"prettier": "@spotify/prettier-config",
"prettier": "@backstage/cli/config/prettier",
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs}": [
"eslint --fix",
Expand Down
6 changes: 3 additions & 3 deletions scripts/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: [require.resolve("@backstage/cli/config/eslint")],
extends: [require.resolve('@backstage/cli/config/eslint')],
rules: {
"no-console": 0,
"no-restricted-imports": 0,
'no-console': 0,
'no-restricted-imports': 0,
},
};
Loading
Loading