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

Add automation scripts for workflow and linter templates #34

Merged
merged 9 commits into from
Aug 31, 2023

Conversation

jordanjones243
Copy link
Contributor

@jordanjones243 jordanjones243 commented Aug 18, 2023

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.

Fixes: #32, #35, #36

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.

  • Add automation scripts that will automatically update templates for Github workflows and Linter configurations
  • Add workflow that will create a surge demo for a component when a PR is created to merge into main or master
  • Add automation to replace instances of abstractNodeVersion and branchName variables with a repo's respective node version and head branch name (main or master)

Additional Context

These scripts have been tested and validated as a POC in auro-combobox and can be verified by @jason-capsule42.

Type of change:

Please delete options that are not relevant.

  • New capability
  • Revision of an existing capability
  • Infrastructure change (automation, etc.)
  • Other (please elaborate)

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

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

@jordanjones243 jordanjones243 requested a review from a team as a code owner August 18, 2023 21:25
@jordanjones243 jordanjones243 self-assigned this Aug 18, 2023
@jordanjones243 jordanjones243 marked this pull request as draft August 21, 2023 18:02
@jordanjones243 jordanjones243 linked an issue Aug 21, 2023 that may be closed by this pull request
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from cfc6bb5 to c4b1a02 Compare August 21, 2023 22:16
@jordanjones243 jordanjones243 marked this pull request as ready for review August 21, 2023 22:16
scripts/utils/auroLibraryUtils.mjs Outdated Show resolved Hide resolved
scripts/utils/auroLibraryUtils.mjs Outdated Show resolved Hide resolved
scripts/config/syncWorkflows.mjs Outdated Show resolved Hide resolved
scripts/config/syncAllTemplates.mjs Outdated Show resolved Hide resolved
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from c4b1a02 to 0d034c1 Compare August 22, 2023 18:39
@jordanjones243 jordanjones243 marked this pull request as draft August 22, 2023 21:03
@jordanjones243 jordanjones243 linked an issue Aug 22, 2023 that may be closed by this pull request
@jordanjones243 jordanjones243 marked this pull request as ready for review August 22, 2023 23:31
Copy link
Member

@blackfalcon blackfalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the intent is to put things into this repo/npm and remove them from the Generator? Also, what is the process for running these scripts?

scripts/config/syncAllTemplates.mjs Outdated Show resolved Hide resolved
componentTemplates/linters/.eslintrc Show resolved Hide resolved
componentTemplates/workflows/codeql.yml Outdated Show resolved Hide resolved
componentTemplates/workflows/testPublish.yml Outdated Show resolved Hide resolved
componentTemplates/workflows/testPublish.yml Outdated Show resolved Hide resolved
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from b03f64a to c9dbd25 Compare August 23, 2023 18:09
@jordanjones243 jordanjones243 marked this pull request as draft August 23, 2023 18:21
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch 5 times, most recently from 71dda7e to 6ef9fa6 Compare August 24, 2023 23:35
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from f7fee80 to 36727ca Compare August 24, 2023 23:38
@jordanjones243 jordanjones243 marked this pull request as ready for review August 24, 2023 23:38
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from 36727ca to fc91cbd Compare August 24, 2023 23:41
@jordanjones243 jordanjones243 linked an issue Aug 24, 2023 that may be closed by this pull request
@jordanjones243
Copy link
Contributor Author

jordanjones243 commented Aug 25, 2023

So, the intent is to put things into this repo/npm and remove them from the Generator? Also, what is the process for running these scripts?

Yes, the intent is to remove workflow and configuration files from the Generator and move them into auro-library. A story for this can be created by @braven112 or @Patrick-Daly-AA.

The process for running/testing these scripts is to link auro-library into another component. To run the syncAllTemplates.mjs script, you will need to add a new node script into the linked component and point that to the syncAllTemplates.mjs file. You can individually run the workflow configurations by pointing to the syncAllTemplates.mjs file and adding a --github parameter after the path. The same can be done for the linter configurations by adding a --linters parameter.

To run the updated generateDocs.mjs script, point the build:docs script in the linked component to the the one that is now in auro-library, rather than the one currently being used in the linked component's repo.

@jordanjones243 jordanjones243 marked this pull request as draft August 25, 2023 20:01
@blackfalcon
Copy link
Member

@jordanjones243

  1. Engineers are responsible for creating issues with the necessary details for the work. @Patrick-Daly-AA and @braven112 really have the decision on when to do the work.
  2. All the instructions you put in this comment, this should be put into the README or other resource. This isn't directly intuitive and no one is going to dig into these comments for these instructions.

@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from 99d2e1e to 10fa2dc Compare August 28, 2023 17:49
@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from 10fa2dc to 57c0a05 Compare August 28, 2023 17:50
@jordanjones243 jordanjones243 marked this pull request as ready for review August 28, 2023 18:06
@jordanjones243
Copy link
Contributor Author

@jordanjones243

  1. Engineers are responsible for creating issues with the necessary details for the work. @Patrick-Daly-AA and @braven112 really have the decision on when to do the work.
  2. All the instructions you put in this comment, this should be put into the README or other resource. This isn't directly intuitive and no one is going to dig into these comments for these instructions.

I have created a story in WC-Generator to move the templates from the generator to auro-library:

I have also created a .md file containing instructions and code examples of how to run these scripts.

@jordanjones243 jordanjones243 force-pushed the jordanjones243/automationScripts branch from 9baa849 to 1fbe171 Compare August 28, 2023 20:30
docs/syncAllTemplates.md Outdated Show resolved Hide resolved
@jordanjones243 jordanjones243 marked this pull request as draft August 29, 2023 18:30
@jordanjones243 jordanjones243 marked this pull request as ready for review August 30, 2023 22:23
@jason-capsule42
Copy link
Member

jason-capsule42 commented Aug 31, 2023

@jordanjones243

  1. Engineers are responsible for creating issues with the necessary details for the work. @Patrick-Daly-AA and @braven112 really have the decision on when to do the work.
  2. All the instructions you put in this comment, this should be put into the README or other resource. This isn't directly intuitive and no one is going to dig into these comments for these instructions.

I have created a story in WC-Generator to move the templates from the generator to auro-library:

I have also created a .md file containing instructions and code examples of how to run these scripts.

@blackfalcon @jordanjones243 I created a ticket that we should get prioritized soon for getting the individual documentation files rolled up into a more thorough readme and presented onto the docsite.

#37

I also added some additional context to this ticket in the generator for removing the files that we now have in the library saying that we need to first make sure the new component template is wired up with the automation to pull in the configuration files from the library.

@jordanjones243 jordanjones243 merged commit 8c2c844 into main Aug 31, 2023
@jordanjones243 jordanjones243 deleted the jordanjones243/automationScripts branch August 31, 2023 16:33
@blackfalcon
Copy link
Member

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blackfalcon blackfalcon added the released Completed work has been released label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Completed work has been released
Projects
None yet
3 participants