-
Notifications
You must be signed in to change notification settings - Fork 9
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
docs: build and release process overview #572
base: master
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request adds a new document, 'buildRelease.md', to the 'docs' directory. The document provides an overview of the build and release process for Auro components, detailing the steps from local development to final release. Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Local as Local Environment
participant Git as Git
participant GH as GitHub
participant NPM as npm
Dev->>Local: git clone repository
Dev->>Local: npm install
Local->>Git: Install husky hooks
Dev->>Local: npm run build
Dev->>Local: npm run build:docs
Dev->>Git: git commit
Git->>Local: Run commit linters
Dev->>GH: Push changes & open PR
GH->>GH: Run CodeQL workflow
GH->>GH: Run Test and publish workflow
GH->>GH: Merge PR
GH->>GH: Run Semantic release
GH->>NPM: Publish new version
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jason-capsule42 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding more specific details about the CI/CD process, including the exact GitHub Actions workflows used and their configurations.
- It would be helpful to standardize the document's structure and use more precise language throughout. Consider using a consistent format for each step in the process.
- Please clarify the inconsistencies mentioned in the document, such as the
build:version
script. If possible, standardize these processes across all components.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟡 Documentation: 6 issues found
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
f5f7aad
to
d6ca5cd
Compare
1. `build:test` | ||
1. `build:api` | ||
1. `build:docs` | ||
1. `bundler` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bundler
100% has to be moved into part of the local dev cycle rather than just release. Any component with complex JS based documentation examples is dependent on the bundler running for it to be able to validate during testing.
To follow through that... if we are already running the bundler as part of the development process, should we be running it again during the release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundled files are not added to Git version control. If you build a dist asset locally, it will not get pushed to the remote. Therefore, the build in the remote is necessary so that the asset can be added to the Node package.
d6ca5cd
to
a39d22a
Compare
1. CodeQL workflow is started | ||
1. Test and publish workflow is started with the following steps - | ||
1. `npm ci` | ||
1. `npm run build` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's acknowledge the different parent build scripts.
build
: run all build actions with no testing or linting
build:release
: runs linters
, then build
then test
1. `npm run build` | ||
1. `npm run build:test` | ||
1. linters | ||
1. unit tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update the test scripts so that they run on the compiled/bundled component JS file so that we are testing what the end user actually gets.
1. Test and publish workflow is started with the following steps - | ||
1. `npm ci` | ||
1. `npm run build` | ||
1. `npm run build:test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this? I think the only time we need it would be part of build:release
.
On principle, I don't think we should be creating wrapper scripts when they only get used once.
1. `build:api` | ||
1. `build:docs` | ||
1. `bundler` | ||
1. `postinstall` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The post install script literally just executes a log statement saying "Welcome to Auro" in a fancy way. We should look at just using the new Auro Library logger to present this message.
FWIW - I think we should look at adding timestopped entries into a .log file that is in the .gitignore file so that we can have better debugging on the scripts we run.
|
||
1. git clone a repository | ||
1. Run `nvm use 20` && `npm install` (nvm step optional) | ||
1. As a post-install hook, git-hook tool husky installs scripts to the .git directory. More on this in the commit section! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this part you are referring to here @DukeFerdinand ?
1. As a post-install hook, git-hook tool husky installs scripts to the .git directory. More on this in the commit section! | ||
1. Checkout a new feature branch off main (some branches still use master) | ||
1. Run `npm run build` - this is a macro to build sass files and generate TypeScript declarations | ||
1. This is inconsistent? Some have `build:version` and some do not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only components that are dependent on other auro components need build:version
. But I think all components should have this as part of the build process and we should make that build:version
script dynamic and able to be configured from one repo to the next, or smart enough to auto figure out what auro-components the repo is dependent on.
1. Checkout a new feature branch off main (some branches still use master) | ||
1. Run `npm run build` - this is a macro to build sass files and generate TypeScript declarations | ||
1. This is inconsistent? Some have `build:version` and some do not | ||
1. Run `npm run build:docs` to bootstrap markdown files from their static HTML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For simplicity, build:docs
should be part of the build
script as well as something that all components run as part of the dev
watch.
**When done working on a feature, or otherwise running git commit:** | ||
|
||
1. A commit message linter will run (commit lint) | ||
1. A precommit hook runs preCommit test linters postinstall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced that all of these are needed as part of commit lint work flow.
precommit
just logs out the definition of done, which is fine.
The test and linters all get run as part of the PR actions which seem like a better place.
Any why run postinstall again? That is just the "welcome to auro" message logging.
|
||
**Once code is merged into main** | ||
|
||
1. CodeQL workflow is started again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this actually triggered? Do we need to do it again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to address that the constant beta releases for any push is causing a semantic release issue when we try and merge beta back into main since the last commit on beta is always a "chore" release. |
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: # (issue, if applicable)
Summary:
Please summarize the scope of the changes you have submitted, what the intent of the work is and anything that describes the before/after state of the project.
Type of change:
Please delete options that are not relevant.
Checklist:
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team
Summary by Sourcery
Document the build and release process for Auro components, detailing local development steps, commit procedures, and automated workflows for code integration and release.
Documentation: