Exemplo n.º 1
0
        public void SetUp()
        {
            var variables = new CalamariVariables();

            service    = Substitute.For <IStructuredConfigVariablesService>();
            deployment = new RunningDeployment(TestEnvironment.ConstructRootedPath("Packages"), variables);
        }
Exemplo n.º 2
0
 public NoOpTraditionalCommandWithStructuredVariableReplacementConvention(
     ILog log,
     IVariables variables,
     IStructuredConfigVariablesService structuredConfigVariablesService)
 {
     this.structuredConfigVariablesService = structuredConfigVariablesService;
     this.log       = log;
     this.variables = variables;
 }
Exemplo n.º 3
0
 public UploadAwsS3Command(
     ILog log,
     IVariables variables,
     ICalamariFileSystem fileSystem,
     ISubstituteInFiles substituteInFiles,
     IExtractPackage extractPackage,
     IStructuredConfigVariablesService structuredConfigVariablesService
     )
 {
     this.log               = log;
     this.variables         = variables;
     this.fileSystem        = fileSystem;
     this.substituteInFiles = substituteInFiles;
     this.extractPackage    = extractPackage;
     this.structuredConfigVariablesService = structuredConfigVariablesService;
     Options.Add("package=", "Path to the package to extract that contains the package.", v => pathToPackage = new PathToPackage(Path.GetFullPath(v)));
     Options.Add("bucket=", "The bucket to use", v => bucket = v);
     Options.Add("targetMode=", "Whether the entire package or files within the package should be uploaded to the s3 bucket", v => targetMode = v);
 }
Exemplo n.º 4
0
 public DeployCloudFormationCommand(ILog log, IVariables variables, ICalamariFileSystem fileSystem, IExtractPackage extractPackage, IStructuredConfigVariablesService structuredConfigVariablesService)
 {
     this.log            = log;
     this.variables      = variables;
     this.fileSystem     = fileSystem;
     this.extractPackage = extractPackage;
     this.structuredConfigVariablesService = structuredConfigVariablesService;
     Options.Add("package=", "Path to the NuGet package to install.", v => pathToPackage = new PathToPackage(Path.GetFullPath(v)));
     Options.Add("template=", "Path to the JSON template file.", v => templateFile       = v);
     Options.Add("templateParameters=", "Path to the JSON template parameters file.", v => templateParameterFile = v);
     Options.Add("templateS3=", "S3 URL to the JSON template file.", v => templateS3Url = v);
     Options.Add("templateS3Parameters=", "S3 URL to the JSON template parameters file.", v => templateParameterS3Url = v);
     Options.Add("waitForCompletion=",
                 "True if the deployment process should wait for the stack to complete, and False otherwise.",
                 v => waitForComplete = !bool.FalseString.Equals(v, StringComparison.OrdinalIgnoreCase)); //True by default
     Options.Add("stackName=", "The name of the CloudFormation stack.", v => stackName = v);
     Options.Add("disableRollback=",
                 "True to disable the CloudFormation stack rollback on failure, and False otherwise.",
                 v => disableRollback = bool.TrueString.Equals(v, StringComparison.OrdinalIgnoreCase)); //False by default
 }
        public DeployJavaArchiveCommand(
            ILog log,
            IScriptEngine scriptEngine,
            IVariables variables,
            ICalamariFileSystem fileSystem,
            ICommandLineRunner commandLineRunner,
            ISubstituteInFiles substituteInFiles,
            IExtractPackage extractPackage,
            IStructuredConfigVariablesService structuredConfigVariablesService
            )
        {
            Options.Add("archive=", "Path to the Java archive to deploy.", v => archiveFile = new PathToPackage(Path.GetFullPath(v)));

            this.log               = log;
            this.scriptEngine      = scriptEngine;
            this.variables         = variables;
            this.fileSystem        = fileSystem;
            this.commandLineRunner = commandLineRunner;
            this.substituteInFiles = substituteInFiles;
            this.extractPackage    = extractPackage;
            this.structuredConfigVariablesService = structuredConfigVariablesService;
        }
Exemplo n.º 6
0
 public RunScriptCommand(
     ILog log,
     IDeploymentJournalWriter deploymentJournalWriter,
     IVariables variables,
     IScriptEngine scriptEngine,
     ICalamariFileSystem fileSystem,
     ICommandLineRunner commandLineRunner,
     ISubstituteInFiles substituteInFiles,
     IStructuredConfigVariablesService structuredConfigVariablesService
     )
 {
     Options.Add("package=", "Path to the package to extract that contains the script.", v => packageFile = Path.GetFullPath(v));
     Options.Add("script=", $"Path to the script to execute. If --package is used, it can be a script inside the package.", v => scriptFileArg = v);
     Options.Add("scriptParameters=", $"Parameters to pass to the script.", v => scriptParametersArg = v);
     this.log = log;
     this.deploymentJournalWriter = deploymentJournalWriter;
     this.variables         = variables;
     this.scriptEngine      = scriptEngine;
     this.fileSystem        = fileSystem;
     this.commandLineRunner = commandLineRunner;
     this.substituteInFiles = substituteInFiles;
     this.structuredConfigVariablesService = structuredConfigVariablesService;
 }
Exemplo n.º 7
0
 public UploadAwsS3Convention(
     ILog log,
     ICalamariFileSystem fileSystem,
     AwsEnvironmentGeneration awsEnvironmentGeneration,
     string bucket,
     S3TargetMode targetMode,
     IProvideS3TargetOptions optionsProvider,
     IBucketKeyProvider bucketKeyProvider,
     ISubstituteInFiles substituteInFiles,
     IStructuredConfigVariablesService structuredConfigVariablesService
     )
 {
     this.log        = log;
     this.fileSystem = fileSystem;
     this.awsEnvironmentGeneration = awsEnvironmentGeneration;
     this.bucket            = bucket;
     this.targetMode        = targetMode;
     this.optionsProvider   = optionsProvider;
     this.bucketKeyProvider = bucketKeyProvider;
     this.substituteInFiles = substituteInFiles;
     this.structuredConfigVariablesService = structuredConfigVariablesService;
     this.md5HashSupported = HashCalculator.IsAvailableHashingAlgorithm(MD5.Create);
 }
 public StructuredConfigVariablesCommand(IVariables variables, IStructuredConfigVariablesService structuredConfigVariablesService)
 {
     this.variables = variables;
     this.structuredConfigVariablesService = structuredConfigVariablesService;
 }
Exemplo n.º 9
0
 public StructuredConfigurationVariablesBehaviour(IStructuredConfigVariablesService structuredConfigVariablesService)
 {
     this.structuredConfigVariablesService = structuredConfigVariablesService;
 }