Skip to content

Commit 53f9ef8

Browse files
Merge pull request KelvinTegelaar#1748 from KelvinTegelaar/dev
Dev to release
2 parents 51a90fd + 34e0715 commit 53f9ef8

File tree

371 files changed

+7188
-238198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+7188
-238198
lines changed

.github/workflows/dev_api.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,67 @@ jobs:
2525
uses: actions/checkout@v4
2626
with:
2727
persist-credentials: false
28+
29+
- name: Setup PowerShell module cache
30+
id: cacher
31+
uses: actions/cache@v3
32+
with:
33+
path: "~/.local/share/powershell/Modules"
34+
key: ${{ runner.os }}-ModuleBuilder
35+
36+
- name: Install ModuleBuilder
37+
if: steps.cacher.outputs.cache-hit != 'true'
38+
shell: pwsh
39+
run: |
40+
Set-PSRepository PSGallery -InstallationPolicy Trusted
41+
Install-Module ModuleBuilder -AllowClobber -Force
42+
43+
- name: Build CIPPCore Module
44+
shell: pwsh
45+
run: |
46+
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CIPPCore"
47+
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
48+
49+
Write-Host "Building module from: $ModulePath"
50+
Write-Host "Output directory: $OutputPath"
51+
52+
# Generate function permissions before replacing the source module
53+
$ToolsPath = Join-Path $env:GITHUB_WORKSPACE "Tools"
54+
$ScriptPath = Join-Path $ToolsPath "Build-FunctionPermissions.ps1"
55+
pwsh -File $ScriptPath -ModulePath $ModulePath
56+
57+
# Build the module using ModuleBuilder
58+
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
59+
60+
# Replace the source module with the built module
61+
Remove-Item -Path $ModulePath -Recurse -Force
62+
Copy-Item -Path (Join-Path $OutputPath "CIPPCore") -Destination $ModulePath -Recurse -Force
63+
64+
Write-Host "Module built and replaced successfully"
65+
66+
# Clean up output directory
67+
Remove-Item -Path $OutputPath -Recurse -Force
68+
69+
- name: Build CippExtensions Module
70+
shell: pwsh
71+
run: |
72+
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CippExtensions"
73+
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
74+
75+
Write-Host "Building module from: $ModulePath"
76+
Write-Host "Output directory: $OutputPath"
77+
78+
# Build the module using ModuleBuilder
79+
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
80+
81+
# Replace the source module with the built module
82+
Remove-Item -Path $ModulePath -Recurse -Force
83+
Copy-Item -Path (Join-Path $OutputPath "CippExtensions") -Destination $ModulePath -Recurse -Force
84+
85+
Write-Host "Module built and replaced successfully"
86+
87+
# Clean up output directory
88+
Remove-Item -Path $OutputPath -Recurse -Force
2889
2990
- name: Login to Azure
3091
uses: azure/login@v2

.github/workflows/dev_cippahmcc.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/dev_cippmpiii.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/publish_release.yml

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
steps:
1818
# Checkout the repository
1919
- name: Checkout Code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
2123

2224
# Read and Trim Version
2325
- name: Read and Trim Version
@@ -68,6 +70,68 @@ jobs:
6870
env:
6971
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7072

73+
- name: Setup PowerShell module cache
74+
id: cacher
75+
uses: actions/cache@v3
76+
with:
77+
path: "~/.local/share/powershell/Modules"
78+
key: ${{ runner.os }}-ModuleBuilder
79+
80+
- name: Install ModuleBuilder
81+
if: steps.cacher.outputs.cache-hit != 'true'
82+
shell: pwsh
83+
run: |
84+
Set-PSRepository PSGallery -InstallationPolicy Trusted
85+
Install-Module ModuleBuilder -AllowClobber -Force
86+
87+
- name: Build CIPPCore Module
88+
shell: pwsh
89+
run: |
90+
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CIPPCore"
91+
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
92+
93+
Write-Host "Building module from: $ModulePath"
94+
Write-Host "Output directory: $OutputPath"
95+
96+
# Generate function permissions before replacing the source module
97+
$ToolsPath = Join-Path $env:GITHUB_WORKSPACE "Tools"
98+
$ScriptPath = Join-Path $ToolsPath "Build-FunctionPermissions.ps1"
99+
pwsh -File $ScriptPath -ModulePath $ModulePath
100+
101+
# Build the module using ModuleBuilder
102+
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
103+
104+
# Replace the source module with the built module
105+
Remove-Item -Path $ModulePath -Recurse -Force
106+
Copy-Item -Path (Join-Path $OutputPath "CIPPCore") -Destination $ModulePath -Recurse -Force
107+
108+
Write-Host "Module built and replaced successfully"
109+
110+
# Clean up output directory
111+
Remove-Item -Path $OutputPath -Recurse -Force
112+
113+
- name: Build CippExtensions Module
114+
shell: pwsh
115+
run: |
116+
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CippExtensions"
117+
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
118+
119+
Write-Host "Building module from: $ModulePath"
120+
Write-Host "Output directory: $OutputPath"
121+
122+
# Build the module using ModuleBuilder
123+
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
124+
125+
# Replace the source module with the built module
126+
Remove-Item -Path $ModulePath -Recurse -Force
127+
Copy-Item -Path (Join-Path $OutputPath "CippExtensions") -Destination $ModulePath -Recurse -Force
128+
129+
Write-Host "Module built and replaced successfully"
130+
131+
# Clean up output directory
132+
Remove-Item -Path $OutputPath -Recurse -Force
133+
134+
71135
# Create ZIP File in a New Source Directory
72136
- name: Prepare and Zip Release Files
73137
if: env.tag_exists == 'false'
@@ -91,4 +155,4 @@ jobs:
91155
container_name: cipp-api
92156
source_folder: src/releases/
93157
destination_folder: /
94-
delete_if_exists: true
158+
delete_if_exists: true

.github/workflows/upload_dev.yml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,69 @@ jobs:
1414
steps:
1515
# Checkout the repository
1616
- name: Checkout Code
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
20+
- name: Setup PowerShell module cache
21+
id: cacher
22+
uses: actions/cache@v3
23+
with:
24+
path: "~/.local/share/powershell/Modules"
25+
key: ${{ runner.os }}-ModuleBuilder
26+
27+
- name: Install ModuleBuilder
28+
if: steps.cacher.outputs.cache-hit != 'true'
29+
shell: pwsh
30+
run: |
31+
Set-PSRepository PSGallery -InstallationPolicy Trusted
32+
Install-Module ModuleBuilder -AllowClobber -Force
33+
34+
- name: Build CIPPCore Module
35+
shell: pwsh
36+
run: |
37+
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CIPPCore"
38+
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
39+
40+
Write-Host "Building module from: $ModulePath"
41+
Write-Host "Output directory: $OutputPath"
42+
43+
# Generate function permissions before replacing the source module
44+
$ToolsPath = Join-Path $env:GITHUB_WORKSPACE "Tools"
45+
$ScriptPath = Join-Path $ToolsPath "Build-FunctionPermissions.ps1"
46+
pwsh -File $ScriptPath -ModulePath $ModulePath
47+
48+
# Build the module using ModuleBuilder
49+
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
50+
51+
# Replace the source module with the built module
52+
Remove-Item -Path $ModulePath -Recurse -Force
53+
Copy-Item -Path (Join-Path $OutputPath "CIPPCore") -Destination $ModulePath -Recurse -Force
54+
55+
Write-Host "Module built and replaced successfully"
56+
57+
# Clean up output directory
58+
Remove-Item -Path $OutputPath -Recurse -Force
59+
60+
- name: Build CippExtensions Module
61+
shell: pwsh
62+
run: |
63+
$ModulePath = Join-Path $env:GITHUB_WORKSPACE "Modules/CippExtensions"
64+
$OutputPath = Join-Path $env:GITHUB_WORKSPACE "Output"
65+
66+
Write-Host "Building module from: $ModulePath"
67+
Write-Host "Output directory: $OutputPath"
68+
69+
# Build the module using ModuleBuilder
70+
Build-Module -SourcePath $ModulePath -OutputDirectory $OutputPath -Verbose
71+
72+
# Replace the source module with the built module
73+
Remove-Item -Path $ModulePath -Recurse -Force
74+
Copy-Item -Path (Join-Path $OutputPath "CippExtensions") -Destination $ModulePath -Recurse -Force
75+
76+
Write-Host "Module built and replaced successfully"
77+
78+
# Clean up output directory
79+
Remove-Item -Path $OutputPath -Recurse -Force
1880
1981
# Create ZIP File in a New Source Directory
2082
- name: Prepare and Zip Release Files

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Logs
99
ExcludedTenants
1010
SendNotifications/config.json
1111
.env
12-
12+
Output/
1313

1414
# Cursor IDE
1515
.cursor/rules

CIPPTimers.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"Id": "4d80205c-674d-4fc1-abeb-a1ec37e0d796",
8585
"Command": "Start-DriftStandardsOrchestrator",
8686
"Description": "Orchestrator to process drift standards",
87-
"Cron": "0 0 */1 * * *",
87+
"Cron": "0 0 */12 * * *",
8888
"Priority": 5,
8989
"RunOnProcessor": true,
9090
"PreferredProcessor": "standards"
@@ -213,5 +213,14 @@
213213
"Priority": 20,
214214
"RunOnProcessor": true,
215215
"IsSystem": true
216+
},
217+
{
218+
"Id": "b8f3c2e1-5d4a-4f7b-9a2c-1e6d8f3b5a7c",
219+
"Command": "Start-BackupRetentionCleanup",
220+
"Description": "Timer to cleanup old backups based on retention policy",
221+
"Cron": "0 0 2 * * *",
222+
"Priority": 21,
223+
"RunOnProcessor": true,
224+
"IsSystem": true
216225
}
217226
]
-12.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)