Skip to content

Commit

Permalink
Merge pull request #2761 from microsoft/dev
Browse files Browse the repository at this point in the history
Add copyInstalledAppToDependencies
  • Loading branch information
freddydk authored Nov 1, 2022
2 parents 95758d0 + cc99eb6 commit 3626596
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion AppHandling/Run-AlPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,12 @@ Measure-Command {
"tenant" = $tenant
"missingDependencies" = @($unknownAppDependencies | Where-Object { $missingAppDependencies -contains "$_".Split(':')[0] })
}
Invoke-Command -ScriptBlock $InstallMissingDependencies -ArgumentList $Parameters
if ($generateDependencyArtifact -and !($testCountry)) {
$parameters += @{
"CopyInstalledAppsToFolder" = Join-Path $buildArtifactFolder "Dependencies"
}
}
Invoke-Command -ScriptBlock $InstallMissingDependencies -ArgumentList $Parameters
} | ForEach-Object { Write-Host -ForegroundColor Yellow "`nInstalling app dependencies took $([int]$_.TotalSeconds) seconds" }
if ($gitHubActions) { Write-Host "::endgroup::" }
}
Expand Down
5 changes: 3 additions & 2 deletions NuGet/Publish-BcNuGetPackageToContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Function Publish-BcNuGetPackageToContainer {
[string] $containerName = $bcContainerHelperConfig.defaultContainerName,
[Parameter(Mandatory=$false)]
[string] $tenant = "default",
[string] $copyInstalledAppsToFolder = "",
[switch] $skipVerification
)

Expand All @@ -25,10 +26,10 @@ Function Publish-BcNuGetPackageToContainer {
if ($package) {
$manifest = [xml](Get-Content (Join-Path $package 'manifest.nuspec') -Encoding UTF8)
$manifest.package.metadata.dependencies.GetEnumerator() | ForEach-Object {
Publish-BcNuGetPackageToContainer -nuGetServerUrl $nuGetServerUrl -nuGetToken $nuGetToken -packageName $_.id -version $_.version -containerName $containerName -tenant $tenant -skipVerification:$skipVerification
Publish-BcNuGetPackageToContainer -nuGetServerUrl $nuGetServerUrl -nuGetToken $nuGetToken -packageName $_.id -version $_.version -containerName $containerName -tenant $tenant -skipVerification:$skipVerification -copyInstalledAppsToFolder $copyInstalledAppsToFolder
}
$appFiles = (Get-Item -Path (Join-Path $package '*.app')).FullName
Publish-BcContainerApp -containerName $containerName -tenant $tenant -appFile $appFiles -sync -install -upgrade -checkAlreadyInstalled -skipVerification
Publish-BcContainerApp -containerName $containerName -tenant $tenant -appFile $appFiles -sync -install -upgrade -checkAlreadyInstalled -skipVerification -copyInstalledAppsToFolder $copyInstalledAppsToFolder
}
}
Export-ModuleMember -Function Publish-BcNuGetPackageToContainer

0 comments on commit 3626596

Please sign in to comment.