PushRevision() публичный Метод

public PushRevision ( ApplicationSetRevision applicationSetRevision ) : Release
applicationSetRevision ApplicationSetRevision
Результат Release
Пример #1
0
        static void Main(string[] args)
        {
            var options = new Options();
            if (!Parser.Default.ParseArguments(args, options)) return;

            var deployer = new Deployer(new AwsConfiguration
            {
                AssumeRoleTrustDocument = options.AssumeRolePolicyPath,
                IamRolePolicyDocument = options.S3AccessPolicyDocumentPath,
                Bucket = options.BucketName,
                RoleName = "S3-Push",
                AwsEndpoint = RegionEndpoint.GetBySystemName(options.RegionEndpoint)
            });

            deployer.PushRevision(new ApplicationSetRevision
            {
               LocalDirectory  = options.BuildDirectoryPath,
               Version = options.Version,
               ApplicationSetName = options.ApplicationSetName
            });
        }
Пример #2
0
        static void Main(string[] args)
        {
            var options = new Options();
            if (!Parser.Default.ParseArguments(args, options))
                Environment.Exit(1);

            var deployer = new Deployer(new AwsConfiguration
            {
                AssumeRoleTrustDocument = options.AssumeRolePolicyPath,
                IamRolePolicyDocument = options.S3AccessPolicyDocumentPath,
                Bucket = options.BucketName,
                RoleName = options.RoleName,
                CodeDeployRoleName = options.CodeDeployRoleName,
                AwsEndpoint = RegionEndpoint.GetBySystemName(options.RegionEndpoint),
                Proxy = new AwsProxy{ Host = options.ProxyHost, Port = options.ProxyPort }
            });
            var revision = deployer.PushRevision(new ApplicationSetRevision
            {
                ApplicationSetName = options.ApplicationSetName,
                StackName = options.StackName,
                Version = options.Version,
                LocalDirectory = options.BuildDirectoryPath
            });
            try
            {
                deployer.DeployRelease(revision, options.CodeDeployRoleName);
            }
            catch (Exception e)
            {
                Console.WriteLine("AWS Push And Deploy Error:");
                Console.WriteLine(e.Message);
                Console.WriteLine(e.StackTrace);
                Environment.Exit(666);
            }
        }