Path() public static method

public static Path ( string filename ) : string
filename string
return string
示例#1
0
        public void EnsureStackExists()
        {
            if (_hasCreatedStack)
            {
                return;
            }

            _awsConfiguration = new AwsConfiguration
            {
                AssumeRoleTrustDocument = Roles.Path("code-deploy-trust.json"),
                IamRolePolicyDocument   = Roles.Path("code-deploy-policy.json"),
                Bucket      = "aws-deployment-tools-tests",
                RoleName    = "CodeDeployRole",
                AwsEndpoint = TestConfiguration.AwsEndpoint,
                Credentials = new TestSuiteCredentials()
            };

            _deployer = new Deployer(_awsConfiguration);

            DeletePreviousTestStack();
            _stack = _deployer.CreateStack(new StackTemplate
            {
                StackName    = StackName,
                TemplatePath = CloudFormationTemplates.Path("example-windows-vpc.template")
            });
            _hasCreatedStack = true;
        }
示例#2
0
        public void EnsureStackExists()
        {
            if (_hasCreatedStack)
            {
                return;
            }

            _awsConfiguration = new AwsConfiguration
            {
                AssumeRoleTrustDocument = Roles.Path("code-deploy-trust.json"),
                IamRolePolicyDocument   = Roles.Path("code-deploy-policy.json"),
                Bucket      = "aws-deployment-tools-tests",
                RoleName    = "CodeDeployRole",
                AwsEndpoint = TestConfiguration.AwsEndpoint,
                Credentials = new TestSuiteCredentials()
            };

            _iamClient = new AmazonIdentityManagementServiceClient(
                new AmazonIdentityManagementServiceConfig
            {
                RegionEndpoint = _awsConfiguration.AwsEndpoint,
                ProxyHost      = _awsConfiguration.ProxyHost,
                ProxyPort      = _awsConfiguration.ProxyPort
            });

            DeletePreviousTestStack();

            _deployer = new Deployer(_awsConfiguration);

            _stack = _deployer.CreateStack(new StackTemplate
            {
                StackName    = StackName,
                TemplatePath = CloudFormationTemplates.Path("example-windows-vpc-autoscaling-group.template")
            });
            _hasCreatedStack = true;
        }
示例#3
0
        public void SetUp()
        {
            var awsEndpoint = TestConfiguration.AwsEndpoint;
            var credentials = new TestSuiteCredentials();

            _s3Client  = new AmazonS3Client(awsEndpoint);
            _iamClient = new AmazonIdentityManagementServiceClient(awsEndpoint);

            _awsConfiguration = new AwsConfiguration
            {
                IamRolePolicyDocument   = Roles.Path("s3-policy-new-bucket.json"),
                AssumeRoleTrustDocument = Roles.Path("code-deploy-trust.json"),
                Bucket      = "s3-push-test",
                RoleName    = "SomeNewRole",
                AwsEndpoint = awsEndpoint,
                Credentials = credentials
            };

            _deployer            = new Deployer(_awsConfiguration);
            _localBuildDirectory = ExampleRevisions.Directory("HelloWorld-1.2.3");
            _applicationSetName  = "HelloWorld";
            _version             = "1.1.1";
            DeleteRolesAndPolicies();
        }