class SCMStepRunSerializer(KatkaSerializer): scm_pipeline_run = SCMPipelineRunRelatedField() class Meta: model = SCMStepRun fields = ('public_identifier', 'step_type', 'slug', 'name', 'stage', 'status', 'output', 'sequence_id', 'scm_pipeline_run', 'tags', 'started_at', 'ended_at')
class SCMReleaseSerializer(KatkaSerializer): scm_pipeline_runs = SCMPipelineRunRelatedField(required=False, read_only=True, many=True) class Meta: model = SCMRelease fields = ("public_identifier", "name", "started_at", "ended_at", "scm_pipeline_runs", "status") read_only_fields = ("started_at", "ended_at", "scm_pipeline_runs")
class SCMReleaseSerializer(KatkaSerializer): scm_pipeline_runs = SCMPipelineRunRelatedField(required=False, read_only=True, many=True) class Meta: model = SCMRelease fields = ('public_identifier', 'name', 'started_at', 'ended_at', 'scm_pipeline_runs', 'status') read_only_fields = ('started_at', 'ended_at', 'scm_pipeline_runs')
class SCMStepRunSerializer(KatkaSerializer): scm_pipeline_run = SCMPipelineRunRelatedField() class Meta: model = SCMStepRun fields = ( "public_identifier", "step_type", "slug", "name", "stage", "status", "output", "sequence_id", "scm_pipeline_run", "tags", "started_at", "ended_at", )
class SCMReleaseCreateSerializer(KatkaSerializer): scm_pipeline_runs = SCMPipelineRunRelatedField(required=False, many=True) class Meta: model = SCMRelease fields = ("name", "scm_pipeline_runs", "status")