public PipelineSchema BuildSchema()
        {
            var schema = new PipelineSchema()
            {
                Revision = _revision,
                Stages   = _stageBuilders.Select(x => x.BuildStage()).ToList(),
                Name     = _schemaName
            };

            return(schema);
        }
 public PipelineCreatedEvent([NotNull] UniquePipelineId pipelineId, [NotNull] PipelineSchema schema)
 {
     if (pipelineId == null)
     {
         throw new ArgumentNullException("pipelineId");
     }
     if (schema == null)
     {
         throw new ArgumentNullException("schema");
     }
     _pipelineId = pipelineId;
     _schema     = schema;
 }
Esempio n. 3
0
        private Project(string name, PipelineSchema schema, Project previousSchemaView)
        {
            Name               = name;
            SchemaVersion      = schema.Revision;
            PreviousSchemaView = previousSchemaView;
            IsLatestVersion    = true;
            Stages             = new List <Stage>();
            DeployedVersions   = new List <DeployedVersion>();

            foreach (var stageSchema in schema.Stages)
            {
                var stage = new Stage(stageSchema.Name, stageSchema.TriggerMode);
                Stages.Add(stage);
            }
        }
 public Pipeline Create(string pipelineId, PipelineSchema schema)
 {
     return(new Pipeline(pipelineId, BuildStages(schema.Name, pipelineId, schema.Stages)));
 }
Esempio n. 5
0
 public static Project CreateNew(string name, PipelineSchema schema)
 {
     return(new Project(name, schema, null));
 }
Esempio n. 6
0
 public virtual Project CreateNewVersion(PipelineSchema schema)
 {
     IsLatestVersion = false;
     return(new Project(Name, schema, this));
 }