Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
32ec95b
Deleted ISSUE_CHECK.md
J-MaFf Dec 29, 2025
becae98
fix: Enforce PowerShell Core requirement and add auto-redirect for Wi…
J-MaFf Dec 29, 2025
647ee31
docs: Add complete SFA certificate workflow documentation to README
J-MaFf Dec 29, 2025
58821c2
docs: Add userList.txt format example to Stage 1 and improve code sty…
J-MaFf Dec 29, 2025
b6a64fb
fix: Improve error messaging to distinguish between missing folders v…
J-MaFf Dec 29, 2025
a3e8df1
chore: Clean up old test output files and apply error messaging impro…
J-MaFf Dec 29, 2025
a2930d1
fix: Correct certificate filtering regex to properly exclude Archive …
J-MaFf Dec 29, 2025
0cb3b0f
fix: Remove unnecessary auto-redirect logic from param() block
J-MaFf Dec 29, 2025
8d0b490
test: Update regex patterns for UNC path and case-insensitive folder …
J-MaFf Dec 29, 2025
1d53d2b
fix: Remove duplicate success list entry in Publish-SFACertificates
J-MaFf Dec 30, 2025
b766dff
refactor: Integrate branch connectivity check into Publish-SFACertifi…
J-MaFf Dec 30, 2025
405ec19
docs: Update documentation for pre-flight connectivity check
J-MaFf Dec 30, 2025
20b321e
docs: Add SFA certificate management workflow to copilot instructions
J-MaFf Dec 30, 2025
c4384b7
🧪 Complete SFA Certificate Management Test Suite (Phases 1-4) (#78)
J-MaFf Dec 30, 2025
a65681e
ci: Add Pester test execution to build pipeline
J-MaFf Dec 30, 2025
df9f1e3
ci: Expand test pipeline to run all tests, not just SFA
J-MaFf Dec 30, 2025
6663e82
fix: Correct YAML indentation in pester-tests workflow
J-MaFf Dec 30, 2025
fbf0c73
test: Skip parameter validation test
J-MaFf Dec 30, 2025
43040cb
fix: Update workflow to use correct action names and v4 upload-artifact
J-MaFf Dec 30, 2025
b731854
fixing workflow
J-MaFf Dec 30, 2025
224a893
fix: Exclude integration tests from CI workflow
J-MaFf Dec 30, 2025
3f43293
fix: Use valid Pester configuration to filter integration tests
J-MaFf Dec 30, 2025
4b76496
ci: Update workflow to use self-hosted Ubuntu runner
J-MaFf Dec 30, 2025
a9a473b
docs: Add guide for setting up self-hosted GitHub Actions runner
J-MaFf Dec 30, 2025
6872286
test: Test self-hosted runner
J-MaFf Dec 30, 2025
2291d51
fix: Use snap to install PowerShell on Ubuntu
J-MaFf Dec 30, 2025
9d186a8
fix: Add certutil fallback for non-exportable certificate private keys
J-MaFf Dec 30, 2025
1c79f00
refactor: Switch certutil to primary export method with PowerShell fa…
J-MaFf Dec 30, 2025
4cceed6
docs: Update default output directory to Scripts/Output/SFA
J-MaFf Dec 30, 2025
92d0786
docs: Update output directory to Scripts/Output/SFA
J-MaFf Dec 30, 2025
472d48f
fix: Correct output directory path to root-level Output/SFA
J-MaFf Dec 30, 2025
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
25 changes: 25 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,28 @@ gh issue edit 84 --add-label "documentation" --add-assignee "J-MaFf"
```

Note: Use `gh issue edit` for both issues and pull requests. Replace `<PR_NUMBER>` with the PR number and `<USERNAME>` with the GitHub username. Labels must exist in the repository; check available labels with `gh label list`.

## Project-Specific Conventions

### SFA Certificate Management Scripts
The `/Scripts/SFA/` directory contains the integrated certificate distribution system:

**Workflow:**
1. **Export-UserCertificates.ps1** - Extracts certificates from Windows Certificate Store
2. **Publish-SFACertificates.ps1** - Distributes certificates to 24+ branch servers with pre-flight connectivity checks
3. **Move-ExpiredUserCertificates.ps1** - Archives expired certificates automatically

**Key Features:**
- Pre-flight connectivity check integrated into Publish-SFACertificates.ps1
- User confirmation prompts for partially accessible branches
- Deduplication: skips certificates already present on remote servers
- Automatic cleanup of expired certificates
- Timestamped reports and CSV exports

**When Making Changes:**
- Update both script help documentation and requirements.md file
- Test connectivity handling and user prompts
- Verify report generation accuracy
- Update README.html to reflect workflow changes
- Use `refactor:` commits when integrating diagnostic tools (e.g., Test-BranchMappings)
- Use `feat:` commits for new connectivity/workflow improvements
109 changes: 109 additions & 0 deletions .github/workflows/pester-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Pester Tests

on:
push:
branches:
- main
- testing
- test/**
paths:
- "Scripts/**"
- "Tests/**"
- "Modules/**"
- ".github/workflows/pester-tests.yml"
pull_request:
branches:
- main
- testing
paths:
- "Scripts/**"
- "Tests/**"
- "Modules/**"
workflow_dispatch:

jobs:
test:
name: Run Pester Tests
runs-on: [self-hosted, linux]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install PowerShell Core
run: |
if ! command -v pwsh &> /dev/null; then
sudo snap install powershell --classic
fi

- name: Verify PowerShell Version
shell: pwsh
run: $PSVersionTable.PSVersion

- name: Install Pester
shell: pwsh
run: |
$ProgressPreference = 'SilentlyContinue'
Install-Module -Name Pester -RequiredVersion 5.7.1 -Force -SkipPublisherCheck
Get-Module -Name Pester -ListAvailable

- name: Run All Tests
shell: pwsh
run: |
$testPath = 'Tests/'
$resultsFile = 'test-results.xml'

# Get all test files except integration tests
$testFiles = @(Get-ChildItem -Path $testPath -Include '*.Tests.ps1' -Recurse |
Where-Object { $_.FullName -notmatch '(Integration|Network)' })

$pesterConfig = @{
Path = $testFiles
OutputFile = $resultsFile
OutputFormat = 'NUnitXml'
ExcludeTag = @('IntegrationNotImplemented')
PassThru = $true
WarningAction = 'SilentlyContinue'
}

$results = Invoke-Pester @pesterConfig

Write-Host "`n========== Test Summary ==========" -ForegroundColor Cyan
Write-Host "Total Tests: $($results.FailedCount + $results.PassedCount)"
Write-Host "Passed: $($results.PassedCount)" -ForegroundColor Green
Write-Host "Failed: $($results.FailedCount)" -ForegroundColor $(if ($results.FailedCount -gt 0) { 'Red' } else { 'Green' })
Write-Host "=================================" -ForegroundColor Cyan

if ($results.FailedCount -gt 0) {
exit 1
}

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: pester-test-results
path: test-results.xml
retention-days: 30

- name: Publish Test Report
if: always()
uses: EnricoMi/publish-unit-test-result-action/linux@v2
with:
files: test-results.xml
check_name: Test Results (PowerShell)
comment_mode: always

test-summary:
name: Complete Test Suite Summary
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Check Test Results
run: |
if [ "${{ needs.test.result }}" == "failure" ]; then
echo "❌ Tests failed - Build cannot proceed"
exit 1
else
echo "✅ All tests passed successfully"
fi
136 changes: 0 additions & 136 deletions ISSUE_CHECK.md

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions Output/SFA/Publish-SFACertificates_Success_20251211_073446.csv

This file was deleted.

58 changes: 0 additions & 58 deletions Output/SFA/Publish-SFACertificates_Summary_20251211_073446.txt

This file was deleted.

Loading
Loading