Ejemplo n.º 1
0
        private static void UpdateVersionsRepo(BuildTargetContext c)
        {
            string githubAuthToken  = EnvVars.EnsureVariable("GITHUB_PASSWORD");
            string nupkgFilePath    = Dirs.Packages;
            string branchName       = c.BuildContext.Get <string>("BranchName");
            string versionsRepoPath = $"build-info/dotnet/cli/{branchName}/Latest";

            VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);

            repoUpdater.UpdatePublishedVersions(nupkgFilePath, versionsRepoPath).Wait();
        }
Ejemplo n.º 2
0
        public static BuildTargetResult UpdateVersionsRepo(BuildTargetContext c)
        {
            string githubAuthToken  = EnvVars.EnsureVariable("GITHUB_PASSWORD");
            string nupkgFilePath    = EnvVars.EnsureVariable("NUPKG_FILE_PATH");
            string versionsRepoPath = EnvVars.EnsureVariable("VERSIONS_REPO_PATH");

            VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);

            repoUpdater.UpdatePublishedVersions(nupkgFilePath, versionsRepoPath).Wait();

            return(c.Success());
        }
Ejemplo n.º 3
0
        private static void PublishCoreHostPackagesToFeed()
        {
            var hostBlob = $"{Channel}/Binaries/{SharedFrameworkNugetVersion}";

            Directory.CreateDirectory(Dirs.PackagesNoRID);
            AzurePublisherTool.DownloadFiles(hostBlob, ".nupkg", Dirs.PackagesNoRID);

            string nugetFeedUrl = EnvVars.EnsureVariable("NUGET_FEED_URL");
            string apiKey       = EnvVars.EnsureVariable("NUGET_API_KEY");

            NuGetUtil.PushPackages(Dirs.PackagesNoRID, nugetFeedUrl, apiKey);
        }
Ejemplo n.º 4
0
        public override bool Execute()
        {
            string githubAuthToken  = EnvVars.EnsureVariable("GITHUB_PASSWORD");
            string nupkgFilePath    = Dirs.Packages;
            string branchName       = BranchName;
            string versionsRepoPath = $"build-info/dotnet/cli/{branchName}/Latest";

            VersionRepoUpdater repoUpdater = new VersionRepoUpdater(githubAuthToken);

            repoUpdater.UpdatePublishedVersions(nupkgFilePath, versionsRepoPath).Wait();

            return(true);
        }
Ejemplo n.º 5
0
 public AzurePublisher()
 {
     _connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"');
     _blobContainer    = GetDotnetBlobContainer(_connectionString);
 }
Ejemplo n.º 6
0
 public AzurePublisher(string containerName = s_dotnetBlobContainerName)
 {
     _connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"');
     _containerName    = containerName;
     _blobContainer    = GetDotnetBlobContainer(_connectionString, containerName);
 }