Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break up private functions & search menu bugfix #152

Merged
merged 73 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
cc8907b
copied functions into new directory
jworkmanjc Jan 7, 2025
31b398a
Move Start Migration
jworkmanjc Jan 7, 2025
817cc8a
remove functions from start-migration
jworkmanjc Jan 7, 2025
c5db822
move form
jworkmanjc Jan 8, 2025
08ed3ff
Changes for Form
jworkmanjc Jan 8, 2025
c3236b4
move progress form
jworkmanjc Jan 8, 2025
96c5bd3
process by owner changes
jworkmanjc Jan 8, 2025
b2ef6ce
progress forms changes
jworkmanjc Jan 8, 2025
61f2c05
Assets file for forms
jworkmanjc Jan 8, 2025
51fd784
Get-ImageFromB64
jworkmanjc Jan 8, 2025
e383850
Function Names
jworkmanjc Jan 8, 2025
4df5df2
rename Build-Exe
jworkmanjc Jan 8, 2025
129ef6b
2.7.11 version + build module functions
jworkmanjc Jan 13, 2025
8d2d16a
change patch for new-admuTemplate
jworkmanjc Jan 13, 2025
70f387e
pester tests
jworkmanjc Jan 13, 2025
3595d22
CI changes for functions location
jworkmanjc Jan 13, 2025
472cd52
functions tests
jworkmanjc Jan 13, 2025
fb4aa8d
update several variable names in test /ci
jworkmanjc Jan 13, 2025
1af77a5
paths for tests
jworkmanjc Jan 13, 2025
f97c47d
update Build tests
jworkmanjc Jan 13, 2025
442a021
Update VS Settings
jworkmanjc Jan 13, 2025
471b218
paths for tests
jworkmanjc Jan 13, 2025
7a43474
Get-SID replace
jworkmanjc Jan 13, 2025
cb9d51f
migration tests paths
jworkmanjc Jan 14, 2025
b95d193
migration tests paths
jworkmanjc Jan 14, 2025
3eff0e1
remove start-jcadmu.ps1 file
jworkmanjc Jan 14, 2025
fa4de49
escape $pid
jworkmanjc Jan 14, 2025
44a9393
write out log content
jworkmanjc Jan 15, 2025
7a0a8e8
skip tests and validate log location in build runner
jworkmanjc Jan 15, 2025
0badb28
not tail log lines
jworkmanjc Jan 15, 2025
ad25854
Write-ToLog shouldn't terminate when writing an error
jworkmanjc Jan 15, 2025
2de84e1
order in error messages
jworkmanjc Jan 15, 2025
796f4de
skip functions tests + why are we using silentlyContinue?
jworkmanjc Jan 15, 2025
07c01ab
can't skip functions tests
jworkmanjc Jan 15, 2025
4c98122
write-error should be write-warnings until final throw message
jworkmanjc Jan 15, 2025
55eeade
tail and validate local users
jworkmanjc Jan 16, 2025
4bc5b90
version of artifact action
jworkmanjc Jan 16, 2025
3b96f20
add param to build [skip ci]
jworkmanjc Jan 16, 2025
f96388c
write out additional debugging
jworkmanjc Jan 16, 2025
ac80704
CUT-4541 - reinstall search/ start appx for all devices (not just win…
jworkmanjc Jan 16, 2025
cb7d1a9
fixed migration tests by importing the module instead of calling star…
jworkmanjc Jan 16, 2025
bc6033f
variable names and logging changes
jworkmanjc Jan 16, 2025
c4c5db1
set systemKey in migration tests
jworkmanjc Jan 16, 2025
ed36b4b
Variable names
jworkmanjc Jan 17, 2025
a57a074
form elements, update to xaml form for MTP selection
jworkmanjc Jan 20, 2025
c30257b
manual tests for uwp + selection form
jworkmanjc Jan 21, 2025
f1a812d
mtp selection form background + size
jworkmanjc Jan 21, 2025
200cbc2
form changes for selecting another MTP org, manual tests
jworkmanjc Jan 21, 2025
d90f04c
Form changes, test-button function updated to test various cases in h…
jworkmanjc Jan 22, 2025
6b481a8
automate tests for selection form Test-MigrationButton
jworkmanjc Jan 22, 2025
439fc7f
test the selection form in ci
jworkmanjc Jan 22, 2025
3fee339
mock names
jworkmanjc Jan 22, 2025
a79a9cb
Only show option to change ORG is MTP admin is returned
jworkmanjc Jan 24, 2025
831a247
CUT-4589 Test for selection form on non-valid SID users
jworkmanjc Jan 24, 2025
63c41b0
change placeholder text in progress form
jworkmanjc Jan 24, 2025
94732fc
update form to declare form elements before submission
jworkmanjc Jan 24, 2025
b6c41c1
Add focus controls to prevent checking the name each time a character…
jworkmanjc Jan 24, 2025
92c3034
CUT-4589 Test-LocalUsername fix
jworkmanjc Jan 24, 2025
3d7d908
resolve changes with Get-MtpOrganization tests
jworkmanjc Jan 24, 2025
639a781
skip migration tests
jworkmanjc Jan 24, 2025
86006c7
manual tests + changes to form, no default password
jworkmanjc Jan 24, 2025
adc719b
updates for local-username tests
jworkmanjc Jan 24, 2025
0a08bbe
test local username changes
jworkmanjc Jan 27, 2025
f0e0359
build date
jworkmanjc Jan 27, 2025
49bfbf6
update start-migration for Get-MtpOrganization changes
jworkmanjc Jan 27, 2025
423ac0b
Update form changes/ test-localUsername
jworkmanjc Jan 28, 2025
6dfd9af
remove throw in Test-LocalUserName, some devices might not have a use…
jworkmanjc Jan 28, 2025
774ee9a
variable name
jworkmanjc Jan 28, 2025
1792882
update test-localUsernames after user is created
jworkmanjc Jan 28, 2025
3211051
temp password should show valid when first viewing the selection form
jworkmanjc Jan 29, 2025
f6df79f
incorrectly defined manual test
jworkmanjc Jan 29, 2025
686859a
show error for username matching hostname
jworkmanjc Jan 29, 2025
f9bd1f4
space in mtp selection
jworkmanjc Jan 29, 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
24 changes: 13 additions & 11 deletions .github/workflows/admu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
# validate release type variables
$env:RELEASE_TYPE | Should -BeIn @('major','minor','patch','manual')
Setup-Build-Dependancies:
Setup-Build-Dependencies:
needs: ["Filter-Branch", "Check-PR-Labels", "Validate-Env-Variables"]
runs-on: windows-latest
timeout-minutes: 10
Expand All @@ -68,7 +68,7 @@ jobs:
uses: actions/cache@v4
with:
path: 'C:\Users\runneradmin\Documents\PowerShell\Modules\'
key: PS-Dependancies
key: PS-Dependencies
- name: Install dependencies
if: steps.cacher.outputs.cache-hit != 'true'
shell: pwsh
Expand All @@ -79,7 +79,7 @@ jobs:
Write-Host ('[status]Installing package provider NuGet');
Install-PackageProvider -Name:('NuGet') -Scope:('CurrentUser') -Force
}
# define dependancies for this ci workflow:
# define dependencies for this ci workflow:
$PSDependencies = @{
'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' }
'ps2exe' = @{Repository = 'PSGallery'; RequiredVersion = '1.0.13' }
Expand All @@ -106,34 +106,36 @@ jobs:
}
}
Build-Module:
needs: ["Setup-Build-Dependancies", "Check-PR-Labels"]
needs: ["Setup-Build-Dependencies", "Check-PR-Labels"]
runs-on: windows-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: 'C:\Users\runneradmin\Documents\PowerShell\Modules\'
key: PS-Dependancies
key: PS-Dependencies
- name: Build ADMU Module
shell: powershell
env:
RELEASE_TYPE: ${{ needs.Check-PR-Labels.outputs.RELEASE_TYPE }}
run: |
. "${{ github.workspace }}/Deploy/build.ps1" -ModuleVersionType $env:RELEASE_TYPE -ModuleName "JumpCloud.ADMU"
- name: Upload Nuspec
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jumpcloud-admu-build
path: |
${{ github.workspace }}/Jumpcloud-ADMU/JumpCloud.ADMU.nuspec
${{ github.workspace }}/Jumpcloud-ADMU/Docs/*.md
${{ github.workspace }}/Jumpcloud-ADMU/Exe/*.exe
${{ github.workspace }}/Jumpcloud-ADMU/Powershell/Form.ps1
${{ github.workspace }}/Jumpcloud-ADMU/en-Us/JumpCloud.ADMU-help.xml
${{ github.workspace }}/Jumpcloud-ADMU/PowerShell/Private/**/*.ps1
${{ github.workspace }}/Jumpcloud-ADMU/PowerShell/Public/**/*.ps1
${{ github.workspace }}/Jumpcloud-ADMU/JumpCloud.ADMU.psd1
${{ github.workspace }}/Jumpcloud-ADMU/JumpCloud.ADMU.psm1
retention-days: 1
Test-Module:
needs: ["Setup-Build-Dependancies", "Check-PR-Labels", "Build-Module"]
needs: ["Setup-Build-Dependencies", "Check-PR-Labels", "Build-Module"]
runs-on: windows-latest
timeout-minutes: 75
strategy:
Expand All @@ -143,13 +145,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: jumpcloud-admu-build
- uses: actions/cache@v4
with:
path: 'C:\Users\runneradmin\Documents\PowerShell\Modules\'
key: PS-Dependancies
key: PS-Dependencies
- name: Test PWSH Module
shell: powershell
env:
Expand Down
25 changes: 11 additions & 14 deletions .github/workflows/admu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Setup-Build-Dependancies:
Setup-Build-Dependencies:
needs: ["Filter-Branch", "Check-PR-Labels"]
runs-on: windows-latest
timeout-minutes: 10
Expand All @@ -65,7 +65,7 @@ jobs:
uses: actions/cache@v4
with:
path: 'C:\Users\runneradmin\Documents\PowerShell\Modules\'
key: PS-Dependancies
key: PS-Dependencies
- name: Install dependencies
if: steps.cacher.outputs.cache-hit != 'true'
shell: pwsh
Expand All @@ -76,7 +76,7 @@ jobs:
Write-Host ('[status]Installing package provider NuGet');
Install-PackageProvider -Name:('NuGet') -Scope:('CurrentUser') -Force
}
# define dependancies for this ci workflow:
# define dependencies for this ci workflow:
$PSDependencies = @{
'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' }
'ps2exe' = @{Repository = 'PSGallery'; RequiredVersion = '1.0.13' }
Expand Down Expand Up @@ -104,14 +104,14 @@ jobs:
}
Build-Sign-ADMU:
runs-on: windows-latest
needs: ["Setup-Build-Dependancies", "Check-PR-Labels"]
needs: ["Setup-Build-Dependencies", "Check-PR-Labels"]
environment: Production
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: "/home/runner/.local/share/powershell/Modules/"
key: PS-Dependancies
key: PS-Dependencies
- name: Build ADMU Module
shell: powershell
env:
Expand All @@ -121,13 +121,10 @@ jobs:
- name: Pack nuspec
shell: pwsh
run: |
# set psm1 to point to public/start-migartion
$psm1Path = "${{ github.workspace }}/jumpcloud-ADMU/JumpCloud.ADMU.psm1"
$psm1Content = Get-Content -path $psm1Path
$psm1Content = $psm1Content -replace "\\Powershell\\", "\Public\"
Set-Content -Value $psm1Content -Path $psm1Path -Force
# Pack
nuget pack "${{ github.workspace }}/jumpcloud-ADMU/JumpCloud.ADMU.nuspec"
# NU5111 - ignore unrecognized ps1 files not named install/ uninstall or init
# NU5110 - ignore files outside tools folder
nuget pack "${{ github.workspace }}/jumpcloud-ADMU/JumpCloud.ADMU.nuspec" -Properties NoWarn=NU5111,NU5110
- name: Validate NuPkg File
shell: pwsh
run: |
Expand Down Expand Up @@ -169,7 +166,7 @@ jobs:
region: ${{ secrets.AWS_REGION }}
version: ${{ env.RELEASE_VERSION }}
- name: Upload Release Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jumpcloud-admu
path: |
Expand All @@ -182,7 +179,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Download ADMU artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: jumpcloud-admu
- name: Build Draft Release
Expand Down Expand Up @@ -211,7 +208,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download ADMU artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: jumpcloud-admu
- name: Publish
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
test_results
JumpCloud.ADMU.nuspec
**/.nupkg
Deploy/ADMU.ps1
Deploy/ADMU.ps1
Deploy/admuTemplate.ps1
20 changes: 19 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{

"spellright.language": ["en"],
"spellright.documentTypes": [
"markdown",
Expand All @@ -7,8 +8,25 @@
"yaml",
"powershell"
],
// powershell settings
"powershell.scriptAnalysis.settingsPath": "jumpcloud-ADMU/Powershell/Tests/PSScriptAnalyzerSettings.psd1",
"powershell.codeFormatting.preset": "OTBS",
"powershell.scriptAnalysis.enable": true,
"files.trimTrailingWhitespace": true
// file formatting & saving:
"prettier.enable": true,
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"search.useIgnoreFiles": false,
// cSpell:
"cSpell.words": [
"ADMU",
],
"cSpell.language": "en",
"cSpell.enabled": true,
"cSpell.enabledFiletypes": [
"latex",
"markdown",
"plaintext",
"powershell"
]
}
119 changes: 0 additions & 119 deletions Deploy/Build-Exe.ps1

This file was deleted.

10 changes: 5 additions & 5 deletions Deploy/Build-Module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Write-Host ('[status]Check PowerShell Gallery for module version info')
if ($ManualModuleVersion) {
$ManualModuleVersionRetrieval = Get-Content -Path:($FilePath_psd1) | Where-Object { $_ -like '*ModuleVersion*' }
$SemanticRegex = [Regex]"[0-9]+.[0-9]+.[0-9]+"
$SemeanticVersion = Select-String -InputObject $ManualModuleVersionRetrieval -pattern ($SemanticRegex)
$ModuleVersion = $SemeanticVersion[0].Matches.Value
$semanticVersion = Select-String -InputObject $ManualModuleVersionRetrieval -pattern ($SemanticRegex)
$ModuleVersion = $semanticVersion[0].Matches.Value
} else {
$PSGalleryInfo = Get-PSGalleryModuleVersion -Name:($ModuleName) -ReleaseType:($RELEASETYPE) #('Major', 'Minor', 'Patch')
$PSGalleryInfo = Get-PSGalleryModuleVersion -Name:($ModuleName) -ReleaseType:($ModuleVersionType) #('Major', 'Minor', 'Patch')
$ModuleVersion = $PSGalleryInfo.NextVersion
}
Write-Host ('[status]PowerShell Gallery Name:' + $PSGalleryInfo.Name + ';CurrentVersion:' + $PSGalleryInfo.Version + '; NextVersion:' + $ModuleVersion )
Expand All @@ -48,7 +48,7 @@ New-ModuleManifest -Path:($FilePath_psd1) `
-FunctionsToExport:($Functions_Public.BaseName | Sort-Object) `
-RootModule:((Get-Item -Path:($FilePath_psm1)).Name) `
-ModuleVersion:($ModuleVersion) `
-Author:('JumpCloud Solutions Architect Team') `
-Author:('JumpCloud Customer Tools Team') `
-CompanyName:('JumpCloud') `
-Copyright:('(c) JumpCloud. All rights reserved.') `
-Description:('Powershell Module to run JumpCloud Active Directory Migration Utility.')
Expand All @@ -62,7 +62,7 @@ If ($ModuleChangelogVersion -ne $PSD1Version) {
($NewModuleChangelogRecord + ($ModuleChangelog | Out-String)).Trim() | Set-Content -Path:($FilePath_ModuleChangelog) -Force
} else {
# Get content between latest version and last
$ModuleChangelogContent = Get-Content -Path:($FilePath_ModuleChangelog) | Select -First 3
$ModuleChangelogContent = Get-Content -Path:($FilePath_ModuleChangelog) | Select-Object -First 3
$ReleaseDateRegex = [regex]'(?<=Release Date:\s)(.*)'
$ReleaseDateRegexMatch = $ModuleChangelogContent | Select-String -Pattern $ReleaseDateRegex
$ReleaseDate = $ReleaseDateRegexMatch.Matches.Value
Expand Down
Loading