Skip to content
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

Improve development workflow for DX Hub plugins #11

Open
wasadigi opened this issue Jun 13, 2023 · 5 comments
Open

Improve development workflow for DX Hub plugins #11

wasadigi opened this issue Jun 13, 2023 · 5 comments

Comments

@wasadigi
Copy link
Member

Context

The initial version of this repo was not designed to release the individual plugins we will add to DX Hub over time. We want to make these plugins available to Backstage adopters and therefore need a way to publish them via the central npm registry.

This question fits into the broader context of managing this repo as a "mono repo". Looking at the evolution and the current state of these repos, we see that there is no single approach:

  • Some organizations have migrated to yarn 3, while others are still using yarn 1
  • Some organizations have dropped lerna while moving to yarn 3
  • Some organizations have upgraded to a more recent version of lerna
  • The pipelines, implemented as GitHub workflows, vary quite a lot

Here are (some of) the repos that we have studied:

Approach

We will start with a simple solution and evolve it over time. The objectives of the first step are:

  • stay on yarn 1 until it becomes the recommended version for Backstage (today, the documentation explains how to migrate to yarn 3, but the scaffolder still uses yarn 1)
  • upgrade to the latest version of lerna
  • use the independent mode for lerna, so that we can manage versions for our plugins independently
  • implement a release pipeline that publishes plugins on npmjs.com
@wasadigi
Copy link
Member Author

After digging into this topic, only using lerna does not seem to be enough. Running lerna version forces us to specify a new version for every package (even the packages that have not been modified).

We are going to use changesets and the companion GitHub action to help us. The main reason is that it is used both in the backstage/backstage and in the RoadieHQ/roadie-backstage-plugins repos (with different configurations...).

This article compares some alternatives to changesets: https://www.hamzak.xyz/blog-posts/release-management-for-nx-monorepos-semantic-release-vs-changesets-vs-release-it-

@wasadigi
Copy link
Member Author

This is a great, short video about changesets and the companion GitHub action: https://www.youtube.com/watch?v=eh89VE3Mk5g

@wasadigi
Copy link
Member Author

Another one, with more details about using the changesets cli: https://www.youtube.com/watch?v=vO80X5zM8_Y

@wasadigi
Copy link
Member Author

See the origin of using changesets in Backstage: backstage/backstage#1839

@wasadigi
Copy link
Member Author

wasadigi commented Jun 15, 2023

I have installed: https://github.com/apps/changeset-bot. Unfortunately, it does not work because our .changeset directory is not at the root of the repo. This is related to changesets/bot#60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant