예제 #1
0
 public TargetChannelConfig(
     int id,
     bool isInternal,
     PublishingInfraVersion publishingInfraVersion,
     string akaMSChannelName,
     string shippingFeed,
     string transportFeed,
     string symbolsFeed,
     string checksumsFeed,
     string installersFeed,
     SymbolTargetType symbolTargetType,
     List <string> filenamesToExclude = null,
     bool flatten = true)
 {
     Id                     = id;
     IsInternal             = isInternal;
     PublishingInfraVersion = publishingInfraVersion;
     AkaMSChannelName       = akaMSChannelName;
     ShippingFeed           = shippingFeed;
     TransportFeed          = transportFeed;
     SymbolsFeed            = symbolsFeed;
     ChecksumsFeed          = checksumsFeed;
     InstallersFeed         = installersFeed;
     SymbolTargetType       = symbolTargetType;
     FilenamesToExclude     = filenamesToExclude ?? new List <string>();
     Flatten                = flatten;
 }
예제 #2
0
 public SetupTargetFeedConfigV3(
     TargetChannelConfig targetChannelConfig,
     bool isInternalBuild,
     bool isStableBuild,
     string repositoryName,
     string commitSha,
     bool publishInstallersAndChecksums,
     ITaskItem[] feedKeys,
     ITaskItem[] feedSasUris,
     ITaskItem[] feedOverrides,
     string latestLinkShortUrlPrefix,
     IBuildEngine buildEngine,
     SymbolTargetType symbolTargetType,
     string stablePackagesFeed             = null,
     string stableSymbolsFeed              = null,
     ImmutableList <string> filesToExclude = null,
     bool flatten          = true,
     TaskLoggingHelper log = null)
     : base(isInternalBuild, isStableBuild, repositoryName, commitSha, null, publishInstallersAndChecksums, null, null, null, null, null, null, null, latestLinkShortUrlPrefix, null)
 {
     _targetChannelConfig = targetChannelConfig;
     BuildEngine          = buildEngine;
     StableSymbolsFeed    = stableSymbolsFeed;
     StablePackagesFeed   = stablePackagesFeed;
     SymbolTargetType     = symbolTargetType;
     FilesToExclude       = filesToExclude ?? ImmutableList <string> .Empty;
     Flatten             = flatten;
     FeedKeys            = feedKeys.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Key"));
     FeedSasUris         = feedSasUris.ToImmutableDictionary(i => i.ItemSpec, i => ConvertFromBase64(i.GetMetadata("Base64Uri")));
     FeedOverrides       = feedOverrides.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Replacement"));
     AzureDevOpsFeedsKey = FeedKeys.TryGetValue("https://pkgs.dev.azure.com/dnceng", out string key) ? key : null;
     Log = log;
 }
 public SetupTargetFeedConfigV3(bool isInternalBuild,
                                bool isStableBuild,
                                string repositoryName,
                                string commitSha,
                                string azureStorageTargetFeedPAT,
                                bool publishInstallersAndChecksums,
                                string installersTargetStaticFeed,
                                string installersAzureAccountKey,
                                string checksumsTargetStaticFeed,
                                string checksumsAzureAccountKey,
                                string azureDevOpsStaticShippingFeed,
                                string azureDevOpsStaticTransportFeed,
                                string azureDevOpsStaticSymbolsFeed,
                                string latestLinkShortUrlPrefix,
                                string azureDevOpsFeedsKey,
                                IBuildEngine buildEngine,
                                SymbolTargetType symbolTargetType,
                                string stablePackagesFeed = null,
                                string stableSymbolsFeed  = null)
     : base(isInternalBuild, isStableBuild, repositoryName, commitSha, azureStorageTargetFeedPAT, publishInstallersAndChecksums, installersTargetStaticFeed, installersAzureAccountKey, checksumsTargetStaticFeed, checksumsAzureAccountKey, azureDevOpsStaticShippingFeed, azureDevOpsStaticTransportFeed, azureDevOpsStaticSymbolsFeed, latestLinkShortUrlPrefix, azureDevOpsFeedsKey)
 {
     BuildEngine        = buildEngine;
     StableSymbolsFeed  = stableSymbolsFeed;
     StablePackagesFeed = stablePackagesFeed;
     SymbolTargetType   = symbolTargetType;
 }
예제 #4
0
 public TargetFeedConfig(TargetFeedContentType contentType,
                         string targetURL,
                         FeedType type,
                         string token,
                         List <string> latestLinkShortUrlPrefixes = null,
                         AssetSelection assetSelection            = AssetSelection.All,
                         bool isolated       = false,
                         bool @internal      = false,
                         bool allowOverwrite = false,
                         SymbolTargetType symbolTargetType       = SymbolTargetType.None,
                         IEnumerable <string> filenamesToExclude = null,
                         bool flatten = true)
 {
     ContentType                = contentType;
     TargetURL                  = targetURL;
     Type                       = type;
     Token                      = token;
     AssetSelection             = assetSelection;
     Isolated                   = isolated;
     Internal                   = @internal;
     AllowOverwrite             = allowOverwrite;
     LatestLinkShortUrlPrefixes = latestLinkShortUrlPrefixes ?? new List <string>();
     SymbolTargetType           = symbolTargetType;
     FilenamesToExclude         = filenamesToExclude?.ToImmutableList() ?? ImmutableList <string> .Empty;
     Flatten                    = flatten;
 }
 public TargetFeedConfig(TargetFeedContentType contentType, string targetURL, FeedType type, string token, string latestLinkShortUrlPrefix = null, AssetSelection assetSelection = AssetSelection.All, bool isolated = false, bool @internal = false, bool allowOverwrite = false, SymbolTargetType symbolTargetType = SymbolTargetType.None)
 {
     ContentType              = contentType;
     TargetURL                = targetURL;
     Type                     = type;
     Token                    = token;
     AssetSelection           = assetSelection;
     Isolated                 = isolated;
     Internal                 = @internal;
     AllowOverwrite           = allowOverwrite;
     LatestLinkShortUrlPrefix = latestLinkShortUrlPrefix ?? string.Empty;
     SymbolTargetType         = symbolTargetType;
 }
예제 #6
0
 public TargetChannelConfig(
     int id,
     bool isInternal,
     PublishingInfraVersion publishingInfraVersion,
     string akaMSChannelName,
     IEnumerable <TargetFeedSpecification> targetFeeds,
     SymbolTargetType symbolTargetType,
     List <string> filenamesToExclude = null,
     bool flatten = true)
 {
     Id                     = id;
     IsInternal             = isInternal;
     PublishingInfraVersion = publishingInfraVersion;
     AkaMSChannelName       = akaMSChannelName;
     TargetFeeds            = targetFeeds.ToImmutableList();
     SymbolTargetType       = symbolTargetType;
     FilenamesToExclude     = filenamesToExclude?.ToImmutableList() ?? ImmutableList <string> .Empty;
     Flatten                = flatten;
 }
예제 #7
0
 public TargetChannelConfig(
     int id,
     PublishingInfraVersion publishingInfraVersion,
     string akaMSChannelName,
     string shippingFeed,
     string transportFeed,
     string symbolsFeed,
     string checksumsFeed,
     string installersFeed,
     SymbolTargetType symbolTargetType)
 {
     Id = id;
     PublishingInfraVersion = publishingInfraVersion;
     AkaMSChannelName       = akaMSChannelName;
     ShippingFeed           = shippingFeed;
     TransportFeed          = transportFeed;
     SymbolsFeed            = symbolsFeed;
     ChecksumsFeed          = checksumsFeed;
     InstallersFeed         = installersFeed;
     SymbolTargetType       = symbolTargetType;
 }
예제 #8
0
        public void PublishToSymbolServersTest(SymbolTargetType symbolTargetType, string symbolServer)
        {
            var publishTask           = new PublishArtifactsInManifestV3();
            var feedConfigsForSymbols = new HashSet <TargetFeedConfig>();

            feedConfigsForSymbols.Add(new TargetFeedConfig(
                                          TargetFeedContentType.Symbols,
                                          "TargetUrl",
                                          FeedType.AzureStorageFeed,
                                          MsdlToken,
                                          string.Empty,
                                          AssetSelection.All,
                                          isolated: true,
                                          @internal: false,
                                          allowOverwrite: true,
                                          symbolTargetType));
            Dictionary <string, string> test =
                publishTask.GetTargetSymbolServers(feedConfigsForSymbols, MsdlToken, SymWebToken);

            Assert.True(
                test.ContainsKey(symbolServer));
            Assert.True(test.Count == 1);
        }