Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
singhgss committed Nov 14, 2023
1 parent 872186b commit 21493ee
Showing 1 changed file with 54 additions and 40 deletions.
94 changes: 54 additions & 40 deletions .github/workflows/sign-scripts-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,54 +164,61 @@ jobs:
continue-on-error: true
with:
inlineScript: |
ipmo ./src/GuardrailsSolutionAcceleratorSetup
ipmo ./src/GuardrailsSolutionAcceleratorSetup
$configFilePath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'config.json'
$CBSSUBSCRIPTION_NAME = $env:CBSSUBSCRIPTION_NAME
$TESTSUBSCRIPTION_ID = $env:TESTSUBSCRIPTION_ID
$LIGHTHOUSEPROVIDER_TENANTID = $env:LIGHTHOUSEPROVIDER_TENANTID
$LIGHTHOUSEPROVIDER_PRINCIPALID = $env:LIGHTHOUSEPROVIDER_PRINCIPALID
$LIGHTHOUSEPROVIDER_MGMTGRPID = $env:LIGHTHOUSEPROVIDER_MGMTGRPID
$UNIQUENAME_SUFFIX = $env:UNIQUENAME_SUFFIX
$configFilePath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'config.json'
$configContent = @'
{
$configContent = @'
{
"keyVaultName": "gsapipe",
"resourcegroup": "gsapipe",
"region": "CanadaCentral",
"storageaccountName": "gsapipe",
"logAnalyticsworkspaceName": "gsapipe",
"autoMationAccountName": "gsapipe",
"FirstBreakGlassAccountUPN": "[email protected]",
"SecondBreakGlassAccountUPN": "[email protected]",
"FirstBreakGlassAccountUPN": "[email protected]",
"SecondBreakGlassAccountUPN": "[email protected]",
"PBMMPolicyID": "4c4a5f27-de81-430b-b4e5-9cbd50595a87",
"AllowedLocationPolicyId": "e56962a6-4747-49cd-b67b-bf8b01975c4c",
"DepartmentNumber": "163",
"CBSSubscriptionName": $env:CBSSUBSCRIPTION_NAME,
"SecurityLAWResourceId": "/subscriptions/" + $env:TESTSUBSCRIPTION_ID + "/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"HealthLAWResourceId": "/subscriptions/" + $env:TESTSUBSCRIPTION_ID + "/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"CBSSubscriptionName": "$CBSSUBSCRIPTION_NAME",
"SecurityLAWResourceId": "/subscriptions/$TESTSUBSCRIPTION_ID/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"HealthLAWResourceId": "/subscriptions/$TESTSUBSCRIPTION_ID/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"Locale": "en-CA",
"lighthouseServiceProviderTenantID": $env:LIGHTHOUSEPROVIDER_TENANTID,
"lighthouseServiceProviderTenantID": "$LIGHTHOUSEPROVIDER_TENANTID",
"lighthousePrincipalDisplayName": "SSC CSPM TEAM",
"lighthousePrincipalId": $env:LIGHTHOUSEPROVIDER_PRINCIPALID,
"lighthouseTargetManagementGroupID": $env:LIGHTHOUSEPROVIDER_MGMTGRPID,
"subscriptionId": $env:TESTSUBSCRIPTION_ID,
"lighthousePrincipalId": "$LIGHTHOUSEPROVIDER_PRINCIPALID",
"lighthouseTargetManagementGroupID": "$LIGHTHOUSEPROVIDER_MGMTGRPID",
"subscriptionId": $TESTSUBSCRIPTION_ID,
"SSCReadOnlyServicePrincipalNameAPPID": "00000000-0000-0000-0000-000000000000",
"uniqueNameSuffix": $env:UNIQUENAME_SUFFIX,
"uniqueNameSuffix": $UNIQUENAME_SUFFIX,
"securityRetentionDays": "730",
"cloudUsageProfiles": "1,2"
}
'@
Set-Content -Path $configFilePath -Value $configContent
'@
Set-Content -Path $configFilePath -Value $configContent
Push-Location -Path setup
Push-Location -Path setup
try {
$ErrorActionPreference = 'Stop'
remove-gsacentralizedReportingCustomerComponents -Force -configFilePath $configFilePath
Remove-GSACentralizedDefenderCustomerComponents -Force -configFilePath $configFilePath
Remove-GSACoreResources -Force -Wait -configFilePath $configFilePath
}
catch {
throw "Failed test deploy of solution with error: $_"
}
finally {
If (!$?) {throw "Failed test deploy of solution with error: $($error[0]) $_"}
Pop-Location
}
try {
$ErrorActionPreference = 'Stop'
remove-gsacentralizedReportingCustomerComponents -Force -configFilePath $configFilePath
Remove-GSACentralizedDefenderCustomerComponents -Force -configFilePath $configFilePath
Remove-GSACoreResources -Force -Wait -configFilePath $configFilePath
}
catch {
throw "Failed test deploy of solution with error: $_"
}
finally {
If (!$?) {throw "Failed test deploy of solution with error: $($error[0]) $_"}
Pop-Location
}
azPSVersion: "latest"
env:
TESTTENANT_DOMAIN: ${{ vars.TESTTENANT_DOMAIN }}
Expand All @@ -226,6 +233,13 @@ jobs:
with:
inlineScript: |
$configFilePath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'config.json'
$CBSSUBSCRIPTION_NAME = $env:CBSSUBSCRIPTION_NAME
$TESTSUBSCRIPTION_ID = $env:TESTSUBSCRIPTION_ID
$LIGHTHOUSEPROVIDER_TENANTID = $env:LIGHTHOUSEPROVIDER_TENANTID
$LIGHTHOUSEPROVIDER_PRINCIPALID = $env:LIGHTHOUSEPROVIDER_PRINCIPALID
$LIGHTHOUSEPROVIDER_MGMTGRPID = $env:LIGHTHOUSEPROVIDER_MGMTGRPID
$UNIQUENAME_SUFFIX = $env:UNIQUENAME_SUFFIX
$configContent = @'
{
"keyVaultName": "gsapipe",
Expand All @@ -234,22 +248,22 @@ jobs:
"storageaccountName": "gsapipe",
"logAnalyticsworkspaceName": "gsapipe",
"autoMationAccountName": "gsapipe",
"FirstBreakGlassAccountUPN": "[email protected]",
"SecondBreakGlassAccountUPN": "[email protected]",
"FirstBreakGlassAccountUPN": "[email protected]",
"SecondBreakGlassAccountUPN": "[email protected]",
"PBMMPolicyID": "4c4a5f27-de81-430b-b4e5-9cbd50595a87",
"AllowedLocationPolicyId": "e56962a6-4747-49cd-b67b-bf8b01975c4c",
"DepartmentNumber": "163",
"CBSSubscriptionName": $env:CBSSUBSCRIPTION_NAME,
"SecurityLAWResourceId": "/subscriptions/" + $env:TESTSUBSCRIPTION_ID + "/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"HealthLAWResourceId": "/subscriptions/" + $env:TESTSUBSCRIPTION_ID + "/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"CBSSubscriptionName": "$CBSSUBSCRIPTION_NAME",
"SecurityLAWResourceId": "/subscriptions/$TESTSUBSCRIPTION_ID/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"HealthLAWResourceId": "/subscriptions/$TESTSUBSCRIPTION_ID/resourceGroups/rg-core/providers/Microsoft.OperationalInsights/workspaces/mtb-law01",
"Locale": "en-CA",
"lighthouseServiceProviderTenantID": $env:LIGHTHOUSEPROVIDER_TENANTID,
"lighthouseServiceProviderTenantID": "$LIGHTHOUSEPROVIDER_TENANTID",
"lighthousePrincipalDisplayName": "SSC CSPM TEAM",
"lighthousePrincipalId": $env:LIGHTHOUSEPROVIDER_PRINCIPALID,
"lighthouseTargetManagementGroupID": $env:LIGHTHOUSEPROVIDER_MGMTGRPID,
"subscriptionId": $env:TESTSUBSCRIPTION_ID,
"lighthousePrincipalId": "$LIGHTHOUSEPROVIDER_PRINCIPALID",
"lighthouseTargetManagementGroupID": "$LIGHTHOUSEPROVIDER_MGMTGRPID",
"subscriptionId": $TESTSUBSCRIPTION_ID,
"SSCReadOnlyServicePrincipalNameAPPID": "00000000-0000-0000-0000-000000000000",
"uniqueNameSuffix": $env:UNIQUENAME_SUFFIX,
"uniqueNameSuffix": $UNIQUENAME_SUFFIX,
"securityRetentionDays": "730",
"cloudUsageProfiles": "1,2"
}
Expand Down

0 comments on commit 21493ee

Please sign in to comment.