예제 #1
0
        protected void DeployPackage(string packageName)
        {
            using (var variablesFile = new TemporaryFile(Path.GetTempFileName()))
            {
                Variables.Save(variablesFile.FilePath);

                var command = new DeployJavaArchiveCommand(new CombinedScriptEngine());
                ReturnCode = command.Execute(new[] { "--archive", $"{packageName}", "--variables", $"{variablesFile.FilePath}" });
            }
        }
예제 #2
0
        protected void DeployPackage(string packageName)
        {
            var command = new DeployJavaArchiveCommand(
                log,
                new ScriptEngine(Enumerable.Empty <IScriptWrapper>()),
                variables,
                fileSystem,
                new CommandLineRunner(log, variables),
                new SubstituteInFiles(log, fileSystem, new FileSubstituter(log, fileSystem), variables),
                new ExtractPackage(new CombinedPackageExtractor(log), fileSystem, variables, log)
                );

            returnCode = command.Execute(new[] { "--archive", $"{packageName}" });
        }
예제 #3
0
        void DeployPackage(string packageName, IVariables variables)
        {
            var commandLineRunner = new CommandLineRunner(log, variables);
            var command           = new DeployJavaArchiveCommand(
                log,
                new ScriptEngine(Enumerable.Empty <IScriptWrapper>()),
                variables,
                fileSystem,
                commandLineRunner,
                new SubstituteInFiles(log, fileSystem, new FileSubstituter(log, fileSystem), variables),
                new ExtractPackage(new CombinedPackageExtractor(log, variables, commandLineRunner), fileSystem, variables, log),
                new StructuredConfigVariablesService(new PrioritisedList <IFileFormatVariableReplacer>
            {
                new JsonFormatVariableReplacer(fileSystem, log),
                new XmlFormatVariableReplacer(fileSystem, log),
                new YamlFormatVariableReplacer(fileSystem, log),
                new PropertiesFormatVariableReplacer(fileSystem, log),
            }, variables, fileSystem, log)
                );

            returnCode = command.Execute(new[] { "--archive", $"{packageName}" });
        }