예제 #1
0
        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;
 }
예제 #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);
            }
        }
예제 #4
0
 public Pipeline Create(string pipelineId, PipelineSchema schema)
 {
     return(new Pipeline(pipelineId, BuildStages(schema.Name, pipelineId, schema.Stages)));
 }
예제 #5
0
 public static Project CreateNew(string name, PipelineSchema schema)
 {
     return(new Project(name, schema, null));
 }
예제 #6
0
 public virtual Project CreateNewVersion(PipelineSchema schema)
 {
     IsLatestVersion = false;
     return(new Project(Name, schema, this));
 }