Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions scripts/bootstrap-demo-apps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ foreach ($app in $DemoApps) {
}
}

# Create 'teardown' environment on scanner repo (required for deploy-all teardown approval gate)
Write-Host "Creating 'teardown' environment on $Org/$ScannerRepo..." -ForegroundColor Cyan
$null = gh api "repos/$Org/$ScannerRepo/environments/teardown" --method PUT 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host " Teardown environment created." -ForegroundColor Green
}
else {
Write-Host " Could not create teardown environment (may need admin access)." -ForegroundColor Yellow
}

# Configure OIDC secrets on the scanner repo (needed for Azure access)
$scannerFullRepo = "$Org/$ScannerRepo"
if ($ConfigureSecrets) {
Expand Down
1 change: 1 addition & 0 deletions scripts/setup-oidc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $Audience = 'api://AzureADTokenExchange'
# Each repo gets a main branch credential; demo apps get deploy-NNN and teardown-NNN environment credentials
$FederatedRepos = @(
@{ Repo = $ScannerRepo; CredName = 'github-actions-scanner-main'; Subject = "repo:${RepoOwner}/${ScannerRepo}:ref:refs/heads/main"; Description = "OIDC for $RepoOwner/$ScannerRepo main branch" }
@{ Repo = $ScannerRepo; CredName = 'github-actions-scanner-teardown-env'; Subject = "repo:${RepoOwner}/${ScannerRepo}:environment:teardown"; Description = "OIDC for $RepoOwner/$ScannerRepo teardown environment" }
@{ Repo = 'a11y-demo-app-001'; CredName = 'github-actions-demo-001-main'; Subject = "repo:${RepoOwner}/a11y-demo-app-001:ref:refs/heads/main"; Description = "OIDC for $RepoOwner/a11y-demo-app-001 main branch" }
@{ Repo = 'a11y-demo-app-001'; CredName = 'github-actions-demo-001-deploy-env'; Subject = "repo:${RepoOwner}/a11y-demo-app-001:environment:deploy-001"; Description = "OIDC for $RepoOwner/a11y-demo-app-001 deploy environment" }
@{ Repo = 'a11y-demo-app-001'; CredName = 'github-actions-demo-001-teardown-env'; Subject = "repo:${RepoOwner}/a11y-demo-app-001:environment:teardown-001"; Description = "OIDC for $RepoOwner/a11y-demo-app-001 teardown environment" }
Expand Down
Loading