GitHub Repository Promotion PowerShell Script
🧰 Shelvera CI/CD Stress Test PowerShell Source
This page provides the maintained PowerShell automation source used to validate and promote Shelvera repositories through the controlled branch flow: local → dev → qa → prod → main → local.
1. Purpose of This Script​
The PowerShell automation supports controlled Shelvera promotion and CI/CD stress testing across selected repositories. It is designed to:
- Validate repositories using a safe dry-run operation.
- Promote committed changes through
local,dev,qa,prod, andmain. - Create a controlled
pipeline-stress-test.txtmarker commit only when the selected execution mode requires it. - Force pipeline testing even when branches are already synchronized.
- Block unexpected downstream divergence as
REVIEW REQUIRED. - Process repositories sequentially with configurable delays.
- Protect the
ts-001parent repository from accidentally tracking its independently managed nested repositories.
Related command-builder page: Use your CI/CD Stress Test and Automation page to generate the correct copy-ready execution command before running this script.
2. Add the Script File to Docusaurus​
Create the following folder and file under your Docusaurus project:
static\scripts\powershell\ts_git_commit_automation.ps1Paste the full PowerShell script into that file exactly as maintained in your local automation folder.
The script contains extensive PowerShell line-continuation backticks, quoted
paths, multiline strings, and Git command arguments. Keeping it as a raw
.ps1 static asset avoids escaping problems that can occur when thousands of
PowerShell lines are inserted into a JavaScript template literal inside MDX.
The page still displays the complete script through CustomCodeBlock.
3. Script File Naming​
Use the same script filename referenced by your command-builder page:
ts_git_commit_automation.ps1The script's internal help examples currently refer to:
Invoke-ShelveraSequentialPromotionTest.ps1This does not prevent the script from running under
ts_git_commit_automation.ps1. However, for long-term consistency, you may
later standardize the .EXAMPLE names inside the script to match the actual
filename used by your command-builder page.
4. Safety Characteristics​
Requires exactly one operation mode:
-DryRunor-CreateTestCommit.Supports
-ForcePipelineStressTestwithout bypassing branch safety or divergence validation.Stages and commits only
pipeline-stress-test.txt.Never executes
git add .orgit add -A.Processes repositories sequentially and supports configurable branch and repository delays.
Stops on unexpected downstream commits by reporting REVIEW REQUIRED.
Supports transcript generation for later operational review.
Includes special parent-repository protection for
ts-001.
A command containing -CreateTestCommit -ForcePipelineStressTest intentionally
creates and pushes a marker commit and can trigger deployments through multiple
branches. Use the dry-run command from your command-builder page first.
5. Complete PowerShell Script​
# Loading Shelvera PowerShell automation source…6. Verification After Adding the Page​
After adding the MDX page and static .ps1 asset, verify the following:
| Verification | Expected Result |
|---|---|
| Documentation page loads | No MDX compile or rendering error |
| Script metadata card | Status displays Loaded successfully |
| Script line display | Full PowerShell source appears in CustomCodeBlock |
| Copy control | Copies the complete script source |
Download Raw .ps1 File button | Downloads or opens the PowerShell script file |
| Existing command-builder page | Continues generating commands without any changes |
| PowerShell script source | Preserves all original backticks, quoted paths and safety checks |
7. Usage Flow​
Use the two documentation pages together:
- Open the CI/CD Stress Test and Automation command-builder page.
- Select the repositories and desired safe-preview options.
- Copy and run the generated preview command.
- Review the result and transcript output.
- Return to the command-builder page and copy the matching execution command only when the preview is clean.
- Use this page whenever you need to review, copy, download or restore the PowerShell automation source.
Recommended documentation structure: Keep the command generator page focused on operational execution, and keep this companion page focused on the maintained PowerShell source. This makes both pages easier to use and easier to update safely.