def create_pipeline(self, onetime=None):
        """Create the spinnaker pipeline(s)."""
        utils.banner("Creating Pipeline")

        kwargs = {
            'app': self.app,
            'trigger_job': self.trigger_job,
            'prop_path': self.json_path,
            'base': None,
            'runway_dir': self.runway_dir,
        }

        pipeline_type = self.configs['pipeline']['type']

        if pipeline_type not in consts.ALLOWED_TYPES:
            raise NotImplementedError('Pipeline type "{0}" not permitted.'.format(pipeline_type))

        if not onetime:
            if pipeline_type == 'lambda':
                spinnakerpipeline = pipeline.SpinnakerPipelineLambda(**kwargs)
            elif pipeline_type == 's3':
                spinnakerpipeline = pipeline.SpinnakerPipelineS3(**kwargs)
            elif pipeline_type == 'datapipeline':
                spinnakerpipeline = pipeline.SpinnakerPipelineDataPipeline(**kwargs)
            elif pipeline_type == 'manual':
                spinnakerpipeline = pipeline.SpinnakerPipelineManual(**kwargs)
            else:
                # Handles all other pipelines
                spinnakerpipeline = pipeline.SpinnakerPipeline(**kwargs)
        else:
            spinnakerpipeline = pipeline.SpinnakerPipelineOnetime(onetime=onetime, **kwargs)

        spinnakerpipeline.create_pipeline()
def create_pipeline ( self , onetime = None ) : utils . banner ( "Creating Pipeline" ) kwargs = { 'app' : self . app , 'trigger_job' : self . trigger_job , 'prop_path' : self . json_path , 'base' : None , 'runway_dir' : self . runway_dir , } pipeline_type = self . configs [ 'pipeline' ] [ 'type' ] if pipeline_type not in consts . ALLOWED_TYPES : raise NotImplementedError ( 'Pipeline type "{0}" not permitted.' . format ( pipeline_type ) ) if not onetime : if pipeline_type == 'lambda' : spinnakerpipeline = pipeline . SpinnakerPipelineLambda ( ** kwargs ) elif pipeline_type == 's3' : spinnakerpipeline = pipeline . SpinnakerPipelineS3 ( ** kwargs ) elif pipeline_type == 'datapipeline' : spinnakerpipeline = pipeline . SpinnakerPipelineDataPipeline ( ** kwargs ) elif pipeline_type == 'manual' : spinnakerpipeline = pipeline . SpinnakerPipelineManual ( ** kwargs ) else : spinnakerpipeline = pipeline . SpinnakerPipeline ( ** kwargs ) else : spinnakerpipeline = pipeline . SpinnakerPipelineOnetime ( onetime = onetime , ** kwargs ) spinnakerpipeline . create_pipeline ( )
Create the spinnaker pipeline(s).