TraitTransformer, ScriptType, ) import concourse.model.traits.component_descriptor class Notify(enum.Enum): EMAIL_RECIPIENTS = 'email_recipients' NOBODY = 'nobody' COMPONENT_OWNERS = 'component_owners' CHECKMARX_ATTRIBUTES = ( AttributeSpec.required( name='team_id', doc='checkmarx team id', type=int, ), AttributeSpec.optional( name='severity_threshold', default=30, doc='threshold above which to notify recipients', type=int, ), AttributeSpec.required( name='cfg_name', doc='config name for checkmarx', type=str, ), )
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from concourse.model.base import ( AttributeSpec, ModelBase, ) OCI_IMAGE_CFG_ATTRIBUTES = ( AttributeSpec.required( name='image_reference', type=str, doc='the OCI Image reference to use', ), ) class OciImageCfg(ModelBase): @classmethod def _attribute_specs(cls): return OCI_IMAGE_CFG_ATTRIBUTES def image_reference(self): return self.raw['image_reference'] class FilterCfg(ModelBase):
PipelineStep, StepNotificationPolicy, ) from concourse.model.base import ( AttribSpecMixin, AttributeSpec, Trait, TraitTransformer, ModelBase, ScriptType, ) IMG_ALTER_ATTRS = ( AttributeSpec.required( name='src_ref', doc='source image reference (including tag)', ), AttributeSpec.required( name='tgt_ref', doc='target image reference (tag defaults to src_ref tag if absent)', ), AttributeSpec.required( name='remove_paths_file', doc=''' path to a text file containing absolute paths (w/o leading /) to be purged from src image. Interpreted relative to main repository root. ''' ), )
from .images import ( IMAGE_ATTRS, ImageFilterMixin, ) ATTRIBUTES = ( *IMAGE_ATTRS, AttributeSpec.optional( name='parallel_jobs', default=4, doc='how many uploads to process in parallel', type=int, ), AttributeSpec.required(name='upload_registry_prefix', doc=''' all matching container images are uploaded as copies to the specified container registry. The original image reference names are mangled. '''), ) class ImageUploadTrait(Trait, ImageFilterMixin): @classmethod def _attribute_specs(cls): return ATTRIBUTES def _children(self): return () def parallel_jobs(self): return self.raw['parallel_jobs']
AttributeSpec.optional( name='processing_mode', default='upload_if_changed', doc='Protecode processing mode', type=ProcessingMode, ), AttributeSpec.optional( name='reference_protecode_group_ids', default=(), doc=''' an optional list of protecode group IDs to import triages from. ''', ), AttributeSpec.required( name='protecode_group_id', doc='technical protecode group id to upload to', type=int, ), AttributeSpec.optional( name='protecode_cfg_name', default=None, doc='protecode cfg name to use (see cc-utils)', ), AttributeSpec.optional( name='email_recipients', default=(), doc= 'optional email recipients to be notified about critical scan results', ), AttributeSpec.optional(name='upload_registry_prefix', default=None,
from model.base import ( ModelDefaultsMixin, ModelValidationError, ) IMG_DESCRIPTOR_ATTRIBS = ( AttributeSpec.optional( name='registry', default=None, type=str, doc='name of the registry config to use when pushing the image (see cc-utils).', ), AttributeSpec.required( name='image', type=str, doc='image reference to publish the created container image to.', ), AttributeSpec.optional( name='inputs', default={ 'repos': None, # None -> default to main repository 'steps': {}, }, doc='configures the inputs that are made available to image build', type=dict, # todo: define types ), AttributeSpec.optional( name='tag_as_latest', default=False, doc='whether or not published container images should **also** be labeled as latest',
AttributeSpec.optional( name='processing_mode', default='upload_if_changed', doc='Protecode processing mode', type=ProcessingMode, ), AttributeSpec.optional( name='reference_protecode_group_ids', default=(), doc=''' an optional list of protecode group IDs to import triages from. ''', ), AttributeSpec.required( name='protecode_group_id', doc='technical protecode group id to upload to', type=int, ), AttributeSpec.optional( name='protecode_cfg_name', default=None, doc='protecode cfg name to use (see cc-config)', ), ) class ProtecodeScanCfg(ModelBase): @classmethod def _attribute_specs(cls): return PROTECODE_ATTRS
AttributeSpec.optional( name='processing_mode', default=ProcessingMode.RESCAN, doc='Protecode processing mode', type=ProcessingMode, ), AttributeSpec.optional( name='reference_protecode_group_ids', default=(), doc=''' an optional list of protecode group IDs to import triages from. ''', ), AttributeSpec.required( name='protecode_group_id', doc='technical protecode group id to upload to', type=int, ), AttributeSpec.optional( name='protecode_cfg_name', default=None, doc='protecode cfg name to use (see cc-config)', ), ) class ProtecodeScanCfg(ModelBase): @classmethod def _attribute_specs(cls): return PROTECODE_ATTRS
import typing from concourse.model.base import ( AttributeSpec, Trait, TraitTransformer, ModelBase, ModelValidationError, ) from concourse.model.job import ( JobVariant, ) CHANNEL_CFG_ATTRS = ( AttributeSpec.required( name='channel_name', doc='the slack channel name', type=str, ), AttributeSpec.required( name='slack_cfg_name', doc='slack_cfg name (see cc-config)', type=str, ), ) class ChannelConfig(ModelBase): @classmethod def _attribute_specs(cls): return CHANNEL_CFG_ATTRS
TraitTransformer, ScriptType, ) import concourse.model.traits.component_descriptor class Notify(enum.Enum): EMAIL_RECIPIENTS = 'email_recipients' NOBODY = 'nobody' COMPONENT_OWNERS = 'component_owners' CHECKMARX_ATTRIBUTES = ( AttributeSpec.required( name='team_id', doc='checkmarx team id', type=int, ), AttributeSpec.optional( name='severity_threshold', default=30, doc='threshold above which to notify recipients', type=int, ), AttributeSpec.required( name='cfg_name', doc='config name for checkmarx', type=str, ), AttributeSpec.optional( name='include_path_regexes',
TraitTransformer, ScriptType, ) import concourse.model.traits.component_descriptor class Notify(enum.Enum): EMAIL_RECIPIENTS = 'email_recipients' NOBODY = 'nobody' COMPONENT_OWNERS = 'component_owners' CHECKMARX_ATTRIBUTES = ( AttributeSpec.required( name='team_id', doc='checkmarx team id', type=int, ), AttributeSpec.optional( name='severity_threshold', default=30, doc='threshold above which to notify recipients', type=int, ), AttributeSpec.required( name='cfg_name', doc='config name for checkmarx', type=str, ), AttributeSpec.optional( name='include_path_regexes',
import typing from concourse.model.base import ( AttributeSpec, Trait, TraitTransformer, ModelBase, ) from concourse.model.job import ( JobVariant, ) CHANNEL_CFG_ATTRS = ( AttributeSpec.required( name='channel_name', doc='the slack channel name', type=str, ), AttributeSpec.required( name='slack_cfg_name', doc='slack_cfg name (see cc-config)', type=str, ), ) class ChannelConfig(ModelBase): @classmethod def _attribute_specs(cls): return CHANNEL_CFG_ATTRS