public DeployFailedEvent(string unitName, DeployedVersion version) { eventName = "deployFailed"; this.unitName = unitName; this.version = version.VersionNumber; this.branch = version.VersionBranch; }
public static void UpdateVersionLog(string inDirectory, DeployedVersion version) { var log = ReadVersionLog(inDirectory); log.Insert(0, version); UpdateLog(inDirectory, log); }
public DeployCompletedEvent(string unitName, DeployedVersion version, UnitStatus status) { eventName = "deployCompleted"; this.unitName = unitName; this.version = version.VersionNumber; this.branch = version.VersionBranch; this.status = status.ToString(); }
public DeployFailedEvent(string unitName, DeployedVersion version) { eventName = "deployFailed"; this.correlationId = version.CorrelationId; this.unitName = unitName; this.version = version.VersionNumber; this.branch = version.VersionBranch; this.userId = version.UserId; this.userName = version.UserName; }
public DeployStartedEvent(string unitName, DeployedVersion version) { this.eventName = "deployStarted"; this.unitName = unitName; this.version = version.VersionNumber; this.branch = version.VersionBranch; this.userId = version.UserId; this.userName = version.UserName; }
public void StartingDeploy(AsimovVersion newVersion, string logFileName) { DeployStatus = DeployStatus.Deploying; Version = new DeployedVersion() { DeployTimestamp = DateTime.Now, VersionId = newVersion.Id, VersionNumber = newVersion.Number, VersionBranch = newVersion.Branch, VersionTimestamp = newVersion.Timestamp, VersionCommit = newVersion.Commit, LogFileName = logFileName, DeployFailed = false }; NodeFront.Notify(new DeployStartedEvent(Name, Version)); }
public virtual DeployUnitInfo GetUnitInfo() { var deployUnitInfo = new DeployUnitInfo(); deployUnitInfo.Name = Name; deployUnitInfo.HasDeployParameters = HasDeployParameters; if (Version == null) { Version = VersionUtil.GetCurrentVersion(DataDirectory); if (Version.DeployFailed) { DeployStatus = DeployStatus.DeployFailed; } } deployUnitInfo.Version = Version; deployUnitInfo.DeployStatus = DeployStatus; return deployUnitInfo; }
public void StartingDeploy(AsimovVersion newVersion, string logFileName, AsimovUser user, string correlationId, ParameterValues parameters) { DeployStatus = DeployStatus.Deploying; Version = new DeployedVersion { DeployTimestamp = DateTime.Now, VersionId = newVersion.Id, VersionNumber = newVersion.Number, VersionBranch = newVersion.Branch, VersionTimestamp = newVersion.Timestamp, VersionCommit = newVersion.Commit, LogFileName = logFileName, UserId = user.UserId, UserName = user.UserName, DeployFailed = false, CorrelationId = correlationId, Parameters = parameters.GetInternalDictionary() }; NotificationPublisher.PublishNotifications(new DeployStartedEvent(Name, Version)); }
public virtual DeployUnitInfo GetUnitInfo() { var deployUnitInfo = new DeployUnitInfo(); deployUnitInfo.Name = Name; deployUnitInfo.HasDeployParameters = HasDeployParameters; if (Version == null) { Version = VersionUtil.GetCurrentVersion(DataDirectory); if (Version.DeployFailed) { DeployStatus = DeployStatus.DeployFailed; } } if (!Version.DeployFailed) { deployUnitInfo.LastDeployed = string.Format("Deployed by {0} {1}", Version.UserName, DateUtils.GetFriendlyAge(Version.DeployTimestamp)); } deployUnitInfo.Version = Version; deployUnitInfo.DeployStatus = DeployStatus; return deployUnitInfo; }