Skip to content

Commit

Permalink
VCI-879: Split Azure token for different Azure sources (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro authored May 29, 2024
1 parent 12a4506 commit eea2aed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ internal partial class Build

[Parameter("Azure PAT")]
public static string AzureToken { get; set; }

[Parameter("Azure PAT for the Universal Packages")]
public static string AzureUniversalPackagesPat { get; set; }

[Parameter("Azure Blob SAS Token")]
public static string AzureSasToken { get; set; }

[Parameter("GitLab Token")]
public static string GitLabToken { get; set; }

Expand Down Expand Up @@ -495,9 +502,9 @@ private static ManifestModuleInfo LoadModuleInfo(ModuleItem module, ManifestModu
private static ModuleInstallerBase GetModuleInstaller(ModuleSource moduleSource) => moduleSource switch
{
AzurePipelineArtifacts => new AzurePipelineArtifactsModuleInstaller(AzureToken, GetDiscoveryPath()),
AzureUniversalPackages => new AzureUniversalPackagesModuleInstaller(AzureToken, GetDiscoveryPath()),
AzureUniversalPackages => new AzureUniversalPackagesModuleInstaller(AzureUniversalPackagesPat ?? AzureToken, GetDiscoveryPath()),
GithubPrivateRepos => new GithubPrivateModulesInstaller(GitHubToken, GetDiscoveryPath()),
AzureBlob _ => new AzureBlobModuleInstaller(AzureToken, GetDiscoveryPath()),
AzureBlob _ => new AzureBlobModuleInstaller(AzureSasToken ?? AzureToken, GetDiscoveryPath()),
GitlabJobArtifacts _ => new GitlabJobArtifactsModuleInstaller(GitLabServer, GitLabToken, GetDiscoveryPath()),
Local _ => new LocalModuleInstaller(GetDiscoveryPath()),
_ => throw new NotImplementedException("Unknown module source"),
Expand Down

0 comments on commit eea2aed

Please sign in to comment.