コード例 #1
0
        public void ArtifactMover_MovesReleaseNotesCorrectly()
        {
            var randomFileName = new Random().Next(1000000) + ".txt";

            System.IO.File.Create(randomFileName).Close();
            Directory.CreateDirectory("Artifacts");
            ArtifactMover.Move(new ArtifactDetails()
            {
                ReleaseNotesFilePath = randomFileName
            }, "Artifacts");
        }
コード例 #2
0
        static void Main(string[] args)
        {
            var argumentProcessor       = new ArgumentProcessor(args);
            var contentPackageGenerator = new Business.ContentPackageGenerator(
                new OctopusDeployService(new OctopusDeploySettings()), new OctopusDeploySettings(),
                new DropBoxService(new DropBoxSettings()));
            var artifactDetails = contentPackageGenerator.CreatePackage(argumentProcessor.SerializationFolder,
                                                                        argumentProcessor.CurrentBuildId, argumentProcessor.ExtractPath);

            var releaseNotesGenereator = new ReleaseNotesGenerator(new BasicOctopusToTeamcityMappingStrategy(), new OctopusDeployService(new OctopusDeploySettings()), new OctopusDeploySettings(), new BasicBuildIdToTagNameStratergy(), new GitHubService(new GitSettings()), new JiraService(new JiraSettings()));
            var releaseNotesFilePath   = releaseNotesGenereator.CreateReleaseNotes(argumentProcessor.CurrentCommitId);

            artifactDetails.ReleaseNotesFilePath = releaseNotesFilePath;

            ArtifactMover.Move(artifactDetails, argumentProcessor.PackageDestinationFolder);
        }