コード例 #1
0
 public DeployFailedEvent(string unitName, DeployedVersion version)
 {
     eventName     = "deployFailed";
     this.unitName = unitName;
     this.version  = version.VersionNumber;
     this.branch   = version.VersionBranch;
     this.userId   = version.UserId;
     this.userName = version.UserName;
 }
コード例 #2
0
 public DeployStartedEvent(string unitName, DeployedVersion version)
 {
     this.correlationId = version.CorrelationId;
     this.eventName     = "deployStarted";
     this.unitName      = unitName;
     this.version       = version.VersionNumber;
     this.branch        = version.VersionBranch;
     this.userId        = version.UserId;
     this.userName      = version.UserName;
 }
コード例 #3
0
 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();
     this.userId   = version.UserId;
     this.userName = version.UserName;
 }
コード例 #4
0
        public void StartingDeploy(AsimovVersion newVersion, string logFileName, AsimovUser user, 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,
                Parameters       = parameters.GetInternalDictionary()
            };

            NotificationPublisher.PublishNotifications(new DeployStartedEvent(Name, Version));
        }
コード例 #5
0
        private void SetVersionName()
        {
            VersionName = IsAutomatedDeploy ? DeployedVersion.ToString() : Application.ProductVersion;
            if (IsAutomatedDeploy && InstanceType == InstanceType.Stable)
            {
                VersionName = VersionName.Substring(0, VersionName.LastIndexOf("."));
            }

            var betaText = InstanceType == InstanceType.Stable ? "" : string.Format(" ({0})", InstanceType);

            if (!IsAutomatedDeploy)
            {
                betaText = " (Debug)";
            }

            VersionName = string.Format("v{0}{1}", VersionName, betaText);

            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("VersionName"));
            }
        }