This commit is contained in:
Sébastien Levert 2021-07-26 16:16:34 -04:00
Родитель 28966893b3
Коммит a1178f13cd
5 изменённых файлов: 61 добавлений и 80 удалений

Просмотреть файл

@ -4,20 +4,19 @@ on:
push:
branches:
- sebastienlevert/fluent-website
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- sebastienlevert/fluent-website
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
runs-on: windows-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Update available Resources
shell: powershell
run: pwsh -command ".\$GITHUB_WORKSPACE\generator\scripts\Build-Workloads.ps1"
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
@ -31,15 +30,3 @@ jobs:
api_location: "api" # Api source code path - optional
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GENTLE_FLOWER_007F5B20F }}
action: "close"

2
generator/.gitignore поставляемый
Просмотреть файл

@ -22,3 +22,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.eslintcache
/public/data/*

Просмотреть файл

@ -0,0 +1,28 @@
param(
[String]$ResourcesOutputPath = "../public/data/resources.json",
[String]$WorkloadsOutputPath = "../public/data/workloads.json",
[switch]$Force
)
$Workloads = Get-Content -Raw -Path "../src/data/workloads.json" | ConvertFrom-Json
Push-Location -Path ../../Modules/Microsoft365DSC/DSCResources
$Resources = @()
Get-ChildItem -Directory | ForEach-Object {
$CurrentResource = $_.Name.Replace('MSFT_', '')
$Workloads | ForEach-Object {
$CurrentWorkload = $_
if ($CurrentResource.StartsWith($CurrentWorkload.id))
{
$Resources += @{
"name" = $CurrentResource;
"workload" = $_.id
}
}
}
}
Pop-Location
ConvertTo-Json -InputObject $Resources -Depth 5 | Out-File $ResourcesOutputPath -Force:$Force
ConvertTo-Json -InputObject $Workloads -Depth 5 | Out-File $WorkloadsOutputPath -Force:$Force

Просмотреть файл

@ -1,26 +0,0 @@
param(
[Parameter(Mandatory=$true)]
$OutputPath,
[switch]
$Force
)
$Workloads = Get-Content -Raw -Path "../src/data/workloads.json" | ConvertFrom-Json
Push-Location -Path ../../Modules/Microsoft365DSC/DSCResources
Get-ChildItem -Directory | ForEach-Object {
$CurrentResource = $_.Name.Replace('MSFT_', '')
$Workloads | ForEach-Object {
$CurrentWorkload = $_
if($CurrentResource.StartsWith($CurrentWorkload.acronym)) {
$CurrentWorkload.resources += @{
"name" = $CurrentResource
}
}
}
}
Pop-Location
ConvertTo-Json -InputObject $Workloads -Depth 5 | Out-File $OutputPath -Force:$Force

Просмотреть файл

@ -1,84 +1,74 @@
[
{
"id": "AAD",
"title": "Azure AD",
"description": "Nunc gravida maximus arcu, ut varius nisi elementum et. Sed faucibus porttitor sagittis. Fusce ut eros placerat, rhoncus velit ac, tincidunt nisl. Proin metus dolor, rutrum at diam ac, consequat dictum leo. Sed tristique massa eget dui blandit, in molestie leo viverra. Nunc rhoncus libero metus, at mattis risus aliquam vel.",
"acronym": "AAD",
"iconName": "AADLogo",
"extractionModes": {
"full": ["AADMSGroup", "AADServicePrincipal"]
},
"resources": []
}
},
{
"id": "EXO",
"title": "Exchange",
"description": "Nunc gravida maximus arcu, ut varius nisi elementum et. Sed faucibus porttitor sagittis. Fusce ut eros placerat, rhoncus velit ac, tincidunt nisl. Proin metus dolor, rutrum at diam ac, consequat dictum leo. Sed tristique massa eget dui blandit, in molestie leo viverra. Nunc rhoncus libero metus, at mattis risus aliquam vel.",
"acronym": "EXO",
"iconName": "ExchangeLogo",
"extractionModes": {
"full": ["EXOMailboxSettings", "EXOManagementRole"]
},
"resources": []
}
},
{
"id": "Intune",
"title": "Intune",
"description": "Donec condimentum massa eget augue hendrerit, dignissim interdum lorem laoreet. Ut et mi quis dui venenatis lobortis. Nunc non lobortis libero.",
"acronym": "Intune",
"resources": []
"iconName": "Devices2"
},
{
"id": "O365",
"title": "Office 365",
"description": "Donec condimentum massa eget augue hendrerit, dignissim interdum lorem laoreet. Ut et mi quis dui venenatis lobortis. Nunc non lobortis libero.",
"acronym": "O365",
"iconName": "OfficeLogo",
"extractionModes": {
"full": ["O365Group", "O365User"]
},
"resources": []
}
},
{
"id": "OD",
"title": "OneDrive",
"description": "Donec condimentum massa eget augue hendrerit, dignissim interdum lorem laoreet. Ut et mi quis dui venenatis lobortis. Nunc non lobortis libero.",
"acronym": "OD",
"resources": []
"iconName": "OneDriveLogo"
},
{
"id": "Planner",
"title": "Planner",
"description": "Donec condimentum massa eget augue hendrerit, dignissim interdum lorem laoreet. Ut et mi quis dui venenatis lobortis. Nunc non lobortis libero.",
"acronym": "Planner",
"iconName": "PlannerLogo",
"extractionModes": {
"full": ["PlannerPlan", "PlannerBucket", "PlannerTask"]
},
"resources": []
}
},
{
"id": "PP",
"title": "Power Platform",
"description": "Donec condimentum massa eget augue hendrerit, dignissim interdum lorem laoreet. Ut et mi quis dui venenatis lobortis. Nunc non lobortis libero.",
"acronym": "PP",
"iconName": "PowerAppsLogo",
"extractionModes": {
"full": ["PPPowerAppsEnvironment"]
},
"resources": []
}
},
{
"id": "SC",
"title": "Security & Compliance",
"description": "Donec condimentum massa eget augue hendrerit, dignissim interdum lorem laoreet. Ut et mi quis dui venenatis lobortis. Nunc non lobortis libero.",
"acronym": "SC",
"resources": []
"iconName": "Encryption"
},
{
"id": "SPO",
"title": "SharePoint",
"description": "Aliquam pretium egestas elit vitae scelerisque. Quisque a diam eu nulla suscipit rhoncus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris porta lorem ex, dapibus euismod arcu imperdiet eget. Maecenas lacinia feugiat nibh, id vulputate sem molestie vitae. Sed at ante non nibh venenatis dictum vel vitae purus. Pellentesque eget ipsum nec felis bibendum luctus. Curabitur vestibulum feugiat augue, quis vehicula enim aliquet sit amet.",
"acronym": "SPO",
"iconName": "SharepointLogo",
"extractionModes": {
"default": ["SPOApp", "SPOSiteDesign"],
"full": ["SPOSiteAuditSettings", "SPOSiteGroup", "SPOSite", "SPOUserProfileProperty", "SPOPropertyBag"]
},
"resources": []
}
},
{
"id": "Teams",
"title": "Teams",
"description": "Mauris euismod consequat orci nec pretium. Nam viverra sed lectus in mattis.",
"acronym": "Teams",
"iconName": "TeamsLogo",
"extractionModes": {
"full": ["TeamsTeam", "TeamsUser", "TeamsChannelTab"]
},
"resources": []
}
}
]