Example #1
0
        public static AsimovVersion Parse(string pattern, string versionString, DateTime lastModified)
        {
            var match = Regex.Match(versionString, pattern, RegexOptions.IgnoreCase);

            if (!match.Success)
            {
                return(null);
            }
            var version = new AsimovVersion
            {
                Id        = versionString,
                Number    = match.Groups["version"].Value,
                Branch    = match.Groups["branch"].Value,
                Commit    = match.Groups["commit"].Value,
                Timestamp = lastModified
            };

            return(version);
        }
        private AsimovVersion GetVersionInfoFromFile(FileInfo fileInfo)
        {
            var match = Regex.Match(fileInfo.Name, Pattern);
            if (!match.Success)
                return null;

            var version = new AsimovVersion();
            version.Id = fileInfo.FullName.Replace(Uri.LocalPath, "");
            version.Id = version.Id.TrimStart(new[] { '\\' });

            version.Number = match.Groups["version"].Value;
            version.Branch = match.Groups["branch"].Value;
            version.Commit = match.Groups["commit"].Value;
            version.Timestamp = fileInfo.LastAccessTime;

            return version;
        }
 public override AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues)
 {
     var task = new DeployTask(this, version, parameterValues);
     task.AddDeployStep<UpdateWindowsService>();
     return task;
 }
 public override AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues)
 {
     var task = new DeployTask(this, version, parameterValues);
     task.AddDeployStep<FileCopyDeployStep>();
     return task;
 }
Example #5
0
        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));
        }
Example #6
0
 public abstract AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues);