public override AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId) { if (!(unit is ICanBeStopStarted)) { throw new ArgumentException("Action is only supported for deploy units that implement ICanBeStopStarted"); } return(((ICanBeStopStarted)unit).GetStopTask()); }
public DeployTask(DeployUnit deployUnit, AsimovVersion version, ParameterValues parameterValues, AsimovUser user) { _deployUnit = deployUnit; _version = version; _parameterValues = parameterValues; _user = user; AddDeployStep <CleanTempFolder>(); AddDeployStep <CopyPackageToTempFolder>(); }
private void Init() { var targetPath = Path.Combine(_pluginPath, _packageName + "." + _packageVersion); var plugDir = new FileInfo(targetPath).Directory; var catalogs = plugDir.GetDirectories("*", SearchOption.AllDirectories).Select(x => new DirectoryCatalog(x.FullName)); var directoryAggregate = new AggregateCatalog(catalogs); _container = new CompositionContainer(directoryAggregate); _container.ComposeParts(this); _node = _exports.First(); }
public PackageSource GetPackageSourceFor(DeployUnit deployUnit) { var matchingPackageSources = PackageSources.Where(x => x.Name == deployUnit.PackageInfo.Source).ToList(); if (matchingPackageSources.Count == 0) { throw new ConfigurationErrorsException($"The package source {deployUnit.PackageInfo.Source}, used by the deploy unit {deployUnit.Name}, does not exist"); } if (matchingPackageSources.Count > 1) { throw new ConfigurationErrorsException($"The package source {deployUnit.PackageInfo.Source}, used by the deploy unit {deployUnit.Name}, is declared more than once."); } return(matchingPackageSources.Single()); }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId) { var previousversion = unit.GetDeployedVersions().Skip(1).FirstOrDefault(x => x.DeployFailed == false); if (previousversion == null) { Log.Warn("Could not find any previous version!"); return(null); } var config = ObjectFactory.GetInstance <IAsimovConfig>(); var packageSource = config.GetPackageSourceFor(unit); var version = packageSource.GetVersion(previousversion.VersionId, unit.PackageInfo); return(unit.GetDeployTask(version, new ParameterValues(previousversion.Parameters), user, correlationId)); }
private static void AddScriptsDir(string configDir, DeployUnit config) { var installable = config as IInstallable; if (installable?.Installable == null) { return; } if (!string.IsNullOrEmpty(installable.Installable.ScriptsDir)) { return; } var scriptsDir = Path.Combine(configDir, "scripts"); if (Directory.Exists(scriptsDir)) { installable.Installable.ScriptsDir = Path.GetFullPath(scriptsDir); } }
public PackageSource GetPackageSourceFor(DeployUnit deployUnit) => PackageSources.Single(x => x.Name == deployUnit.PackageInfo.Source);
public CommandTask(DeployUnit deployUnit, string command) { this.deployUnit = deployUnit; this.command = command; }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId) { return(new VerifySiteTask((WebSiteDeployUnit)unit, Urls.ToArray(), correlationId)); }
public PackageSource GetPackageSourceFor(DeployUnit deployUnit) { return PackageSources.Single(x => x.Name == deployUnit.PackageInfo.Source); }
public abstract AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId);
public PowershellUninstallTask(InstallableConfig config, DeployUnit unit, Dictionary <string, object> unitParameters) { _installableConfig = config; _unit = unit; _unitParameters = unitParameters; }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user) { return(new CommandTask(unit, Command)); }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user) { return(new VerifyCommandTask((WebSiteDeployUnit)unit, ZipPath, Command)); }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user) { return(new PowershellCommandTask(Arguments)); }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId) { return(new PowershellCommandTask(Arguments, correlationId)); }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId) { return(new CommandTask(unit, Command, correlationId)); }
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user, string correlationId) { return(new VerifyCommandTask((WebSiteDeployUnit)unit, ZipPath, Command, correlationId)); }
public CommandTask(DeployUnit deployUnit, string command, string correlationId) { this.deployUnit = deployUnit; this.command = command; this.correlationId = correlationId; }
public abstract AsimovTask GetTask(DeployUnit unit, AsimovUser user);
public override AsimovTask GetTask(DeployUnit unit, AsimovUser user) { return(new VerifySiteTask((WebSiteDeployUnit)unit, Urls.ToArray())); }