NavxBuildHelper.psm1
#Requires -PSEdition Desktop Set-StrictMode -Version 2.0 $verbosePreference = "SilentlyContinue" $warningPreference = 'Continue' $errorActionPreference = 'Stop' if ([intptr]::Size -eq 4) { throw "NavxBuildHelper cannot run in Windows PowerShell (x86), need 64bit mode" } $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) $isAdministrator = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if ($isAdministrator -eq $false) { Check-NavContainerHelperPermissions -Fix -Silent } # Helper Functions # AL . (Join-Path $PSScriptRoot "AL\Get-EnvironmentKeyValue.ps1") . (Join-Path $PSScriptRoot "AL\New-CredentialFromEnvironmentJson.ps1") . (Join-Path $PSScriptRoot "AL\Set-EnvironmentKeyValue.ps1") . (Join-Path $PSScriptRoot "AL\Get-RuntimePackage.ps1") . (Join-Path $PSScriptRoot "AL\Get-ALDependencies.ps1") . (Join-Path $PSScriptRoot "AL\Test-TablePermissionsExist.ps1") . (Join-Path $PSScriptRoot "AL\Invoke-CompileApp.ps1") . (Join-Path $PSScriptRoot "AL\Get-AppKeyValue.ps1") . (Join-Path $PSScriptRoot "AL\Get-Symbols.ps1") . (Join-Path $PSScriptRoot "AL\New-ALAppDependency.ps1") . (Join-Path $PSScriptRoot "AL\Get-IsALRepo.ps1") . (Join-Path $PSScriptRoot "AL\Invoke-BuildALAppPackage.ps1") . (Join-Path $PSScriptRoot "AL\Set-AppKeyValue.ps1") . (Join-Path $PSScriptRoot "AL\Add-TestAppsToAppJson.ps1") . (Join-Path $PSScriptRoot "AL\Install-NavAppFromVSCode.ps1") . (Join-Path $PSScriptRoot "AL\Remove-ALTestDependencies.ps1") . (Join-Path $PSScriptRoot "AL\Get-ALDependenciesFromAppJson.ps1") . (Join-Path $PSScriptRoot "AL\Get-AppJsonForProjectAndRepo.ps1") . (Join-Path $PSScriptRoot "AL\Get-DependencyFromEnvironment.ps1") # Code Signing . (Join-Path $PSScriptRoot "CodeSigning\Invoke-SignFile.ps1") # Containers . (Join-Path $PSScriptRoot "Containers\Get-ImageNameForRepo.ps1") . (Join-Path $PSScriptRoot "Containers\New-Container.ps1") . (Join-Path $PSScriptRoot "Containers\Get-ContainerFromLaunchJson.ps1") . (Join-Path $PSScriptRoot "Containers\Get-VSCodeExtensionFromContainer.ps1") . (Join-Path $PSScriptRoot "Containers\Get-CompilerFromContainer.ps1") . (Join-Path $PSScriptRoot "Containers\Remove-Container.ps1") . (Join-Path $PSScriptRoot "Containers\New-ContainerFromVSCode.ps1") # DevOps . (Join-Path $PSScriptRoot "DevOpsHandling\Get-DevOpsProjects.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-DevOpsArtifacts.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Invoke-AzureDevOpsApi.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-RepositoryId.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-LastSuccessfulBuildId.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-DevOpsArtifactsFromLastSuccessfulBuild.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\New-GitCountryBranches.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-AllSuccessfulBuilds.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-DevOpsArtifactsFromFeed.ps1") . (Join-Path $PSScriptRoot "DevOpsHandling\Get-DevOpsAllArtifactsFromFeed.ps1") # File Handling . (Join-Path $PSScriptRoot "FileHandling\New-EmptyDirectory.ps1") . (Join-Path $PSScriptRoot "FileHandling\New-TempDirectory.ps1") . (Join-Path $PSScriptRoot "FileHandling\Get-FileListFromFolder.ps1") # FTP . (Join-Path $PSScriptRoot "FtpHandling\Add-FTPItem.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Get-FTPChildItem.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Get-FTPConnection.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Get-FTPItem.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Get-FTPItemSize.ps1") . (Join-Path $PSScriptRoot "FtpHandling\New-FTPItem.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Remove-FTPItem.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Rename-FTPItem.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Set-FTPConnection.ps1") . (Join-Path $PSScriptRoot "FtpHandling\Send-FtpFile.ps1") # Testing . (Join-Path $PSScriptRoot "Testing\Invoke-BCTests.ps1") . (Join-Path $PSScriptRoot "Testing\Get-TestCodeunitsInContainer.ps1") . (Join-Path $PSScriptRoot "Testing\Install-BuildHelper.ps1") . (Join-Path $PSScriptRoot "Testing\Get-ContainerCompanyToTest.ps1") . (Join-Path $PSScriptRoot "Testing\Invoke-TestsFromVSCode.ps1") # VS Code . (Join-Path $PSScriptRoot "VS Code\Get-InstalledVSCodeExtensionVersion.ps1") . (Join-Path $PSScriptRoot "VS Code\Install-VSCodeExtensionFromContainer.ps1") . (Join-Path $PSScriptRoot "VS Code\Uninstall-VSCodeExtensionFromContainer.ps1") |