/// <summary> /// Initialize a new SignatureVSTSFeed. /// Its <see cref="NuGetHelper.Feed.Name"/> is set to "<paramref name="organization"/>-<paramref name="feedName"/>" /// (and may be prefixed with "CCB-" if it doesn't correspond to a source defined in the NuGet.config settings. /// </summary> /// <param name="organization">Name of the organization.</param> /// <param name="feedName">Identifier of the feed in Azure, inside the organization.</param> public SignatureVSTSFeed(NuGetArtifactType t, string organization, string feedName) : base(t, organization + "-" + feedName, $"https://pkgs.dev.azure.com/{organization}/_packaging/{feedName}/nuget/v3/index.json", GetSecretKeyName(organization)) { Organization = organization; FeedName = feedName; }
/// <summary> /// Initialize a new remote feed. /// Its final <see cref="Name"/> is the one of the existing feed if it appears in the existing /// sources (from NuGet configuration files) or "CCB-<paramref name="name"/>" if this is /// an unexisting source (CCB is for CodeCakeBuilder). /// </summary> /// <param name="type">The central NuGet handler.</param> /// <param name="name">Name of the feed.</param> /// <param name="urlV3">Must be a v3/index.json url otherwise an argument exception is thrown.</param> protected NuGetFeed(NuGetArtifactType type, string name, string urlV3) : this(type, _sourceProvider.FindOrCreateFromUrl(name, urlV3)) { if (this is VSTSFeed f) { _vstsFeeds.Add(f); } }
NuGetFeed(NuGetArtifactType type, PackageSource s) : base(type) { _packageSource = s; _sourceRepository = new SourceRepository(_packageSource, _providers); _updater = new AsyncLazy <PackageUpdateResource>(async() => { PackageUpdateResource r = await _sourceRepository.GetResourceAsync <PackageUpdateResource>(); // TODO: Update for next NuGet version? // r.Settings = _settings; return(r); }); }
public void Pack() { NuGetArtifactType nugetInfo = _globalInfo.ArtifactTypes.OfType <NuGetArtifactType>().Single(); DotNetCorePackSettings settings = new DotNetCorePackSettings().AddVersionArguments(_globalInfo.GitInfo, c => { c.NoBuild = true; c.IncludeSymbols = true; c.Configuration = _globalInfo.BuildConfiguration; c.OutputDirectory = _globalInfo.ReleasesFolder.Path; }); foreach (NuGetArtifactType.NuGetArtifact p in nugetInfo.GetNuGetArtifacts()) { _globalInfo.Cake.Information(p.ArtifactInstance); _globalInfo.Cake.DotNetCorePack(p.Project.Path.FullPath, settings); } }
void StandardCreateNuGetPackages(NuGetArtifactType nugetInfo) { var settings = new DotNetCorePackSettings().AddVersionArguments(nugetInfo.GlobalInfo.GitInfo, c => { // IsPackable=true is required for Tests package. Without this Pack on Tests projects // does not generate nupkg. c.ArgumentCustomization += args => args.Append("/p:IsPackable=true"); c.NoBuild = true; c.IncludeSymbols = true; c.Configuration = nugetInfo.GlobalInfo.BuildConfiguration; c.OutputDirectory = nugetInfo.GlobalInfo.ReleasesFolder.Path; }); foreach (var p in nugetInfo.GetNuGetArtifacts()) { Cake.Information(p.ArtifactInstance); Cake.DotNetCorePack(p.Project.Path.FullPath, settings); } }
/// <summary> /// Initialize a new remote feed. /// Its final <see cref="Name"/> is the one of the existing feed if it appears in the existing /// sources (from NuGet configuration files) or "CCB-<paramref name="name"/>" if this is /// an unexisting source (CCB is for CodeCakeBuilder). /// </summary> /// <param name="type">The central NuGet handler.</param> /// <param name="name">Name of the feed.</param> /// <param name="urlV3">Must be a v3/index.json url otherwise an argument exception is thrown.</param> protected NuGetFeed(NuGetArtifactType type, string name, string urlV3) : this(type, _sourceProvider.FindOrCreateFromUrl(name, urlV3)) { if (this is VSTSFeed f) { if (HttpHandlerResourceV3.CredentialService == null) { HttpHandlerResourceV3.CredentialService = new Lazy <ICredentialService>( () => new CredentialService( providers: new AsyncLazy <IEnumerable <ICredentialProvider> >( () => System.Threading.Tasks.Task.FromResult <IEnumerable <ICredentialProvider> >( new List <Creds> { new Creds(Cake) }) ), nonInteractive: true, handlesDefaultCredentials: true) ); } _vstsFeeds.Add(f); } }
void StandardCreateNuGetPackages(NuGetArtifactType nugetInfo) { nugetInfo.GlobalInfo.GetDotnetSolution().Pack(); }
public NugetLocalFeed(NuGetArtifactType t, string path) : base(t, path) { }
/// <summary> /// Initialize a new remote feed. /// The push is controlled by an API key name that is the name of an environment variable /// that must contain the actual API key to push packages. /// </summary> /// <param name="name">Name of the feed.</param> /// <param name="urlV3">Must be a v3/index.json url otherwise an argument exception is thrown.</param> /// <param name="secretKeyName">The secret key name.</param> public RemoteFeed(NuGetArtifactType t, string name, string urlV3, string secretKeyName) : base(t, name, urlV3) { SecretKeyName = secretKeyName; }
/// <summary> /// Initialize a new local feed. /// Its final <see cref="Name"/> is the one of the existing feed if it appears in the existing /// sources (from NuGet configuration files) or "CCB-GetDirectoryName(localPath)" if this is /// an unexisting source (CCB is for CodeCakeBuilder). /// </summary> /// <param name="type">The central NuGet handler.</param> /// <param name="localPath">Local path.</param> protected NuGetFeed(NuGetArtifactType type, string localPath) : this(type, _sourceProvider.FindOrCreateFromLocalPath(localPath)) { }