OSD
OSD copied to clipboard
Adding Gitlab API Support
Adding Gitlab API Support
This change adds support for accessing GitLab repositories with or without OAuth. This update does not alter the existing switches so that existing configurations will not need to be modified.
Existing switches that have verified and worked
Start-OSDPad OSDeploy OSDHelp OSDCloudDeploy [-OAuth xxxxxxxxxxx]
Start-OSDPad -RepoOwner OSDeploy -RepoName OSDHelp -RepoFolder OSDCloudDeploy [-OAuth xxxxxxxxxxx]
Screen Capture
New switches to support GitLab
Start-OSDPad 26 Scripts -RepoDomain gitlab.domain.com [-OAuth xxxxxxxxxxx]
Start-OSDPad -RepoName 26 -RepoFolder Scripts -RepoDomain gitlab.domain.com [-OAuth xxxxxxxxxxx]
Screen Capture
Sorry had some issues rebasing. This should be good now.
To do a quick test you can run these commands inside of OSDCloud WinPE once it has booted.
These commands will prepare the environment, download the modified versions of the file, and force reload the module.
Set-DisRes 1600
Set-Location -Path "X:\Program Files\WindowsPowerShell\Modules\OSD\22.6.17.1\Public\Functions\split"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/CodyRWhite/OSD/GitLab-API/Public/Functions/split/Start-OSDPad.ps1" -OutFile "Start-OSDPad.ps1"
Set-Location -Path "X:\Program Files\WindowsPowerShell\Modules\OSD\22.6.17.1\Projects"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/CodyRWhite/OSD/GitLab-API/Projects/OSDPad.ps1" -OutFile "OSDPad.ps1"
Import-Modules OSD -Force
once the module has been reloaded you can test with the following commands
- GitHub no OAuth
Start-OSDPad OSDeploy OSDHelp OSDCloudDeploy
- GitLab with OAuth
Start-OSDPad 12 Scripts -RepoDomain gitlab.domain.com -OAuth "xxxxxxxxxxxxxxxx"
I can setup a test GitLab environment if required for PoC/Testing.