示例#1
0
 def __init__(
     self,
     name,
     args,
     action,
     manifest,
     set_owner_reference,
     success_condition,
     failure_condition,
     timeout=None,
     retry=None,
     pool=None,
     cache=None,
 ):
     Template.__init__(
         self,
         name=name,
         timeout=timeout,
         retry=retry,
         pool=pool,
         cache=cache,
     )
     self.args = args
     self.action = action
     self.manifest = manifest
     self.set_owner_reference = utils.bool_to_str(set_owner_reference)
     self.success_condition = success_condition
     self.failure_condition = failure_condition
示例#2
0
 def __init__(
     self,
     name,
     image,
     command,
     source,
     env=None,
     secret=None,
     resources=None,
     image_pull_policy=None,
     retry=None,
     timeout=None,
     pool=None,
     daemon=False,
 ):
     Template.__init__(
         self,
         name=name,
         timeout=timeout,
         retry=retry,
         pool=pool,
         daemon=daemon,
     )
     self.image = image
     self.command = "python" if command is None else command
     self.source = source
     self.env = env
     self.secret = secret
     self.resources = resources
     self.image_pull_policy = image_pull_policy
示例#3
0
 def __init__(
     self,
     name,
     image,
     command,
     args=None,
     env=None,
     env_from=None,
     secret=None,
     resources=None,
     image_pull_policy=None,
     retry=None,
     timeout=None,
     pool=None,
     output=None,
     input=None,
     enable_ulogfs=True,
     daemon=False,
     volume_mounts=None,
     working_dir=None,
     node_selector=None,
     volumes=None,
     cache=None,
     parallelism=None,
 ):
     Template.__init__(
         self,
         name=name,
         output=utils.make_list_if_not(output),
         input=utils.make_list_if_not(input),
         timeout=timeout,
         retry=retry,
         pool=pool,
         enable_ulogfs=enable_ulogfs,
         daemon=daemon,
         cache=cache,
         parallelism=parallelism,
     )
     self.image = image
     self.command = utils.make_list_if_not(command)
     self.args = args
     self.env = env
     self.env_from = env_from
     self.secret = secret
     self.resources = resources
     self.image_pull_policy = image_pull_policy
     self.volume_mounts = volume_mounts
     self.working_dir = working_dir
     self.node_selector = node_selector
     self.volumes = volumes
示例#4
0
 def __init__(
     self,
     name,
     image,
     command,
     args=None,
     env=None,
     secret=None,
     resources=None,
     image_pull_policy=None,
     retry=None,
     timeout=None,
     pool=None,
     output=None,
     input=None,
     enable_ulogfs=True,
     daemon=False,
     volume_mounts=None,
 ):
     Template.__init__(
         self,
         name=name,
         output=utils.make_list_if_not(output),
         input=utils.make_list_if_not(input),
         timeout=timeout,
         retry=retry,
         pool=pool,
         enable_ulogfs=enable_ulogfs,
         daemon=daemon,
     )
     self.image = image
     self.command = utils.make_list_if_not(command)
     self.args = args
     self.env = env
     self.secret = secret
     self.resources = resources
     self.image_pull_policy = image_pull_policy
     self.volume_mounts = volume_mounts
示例#5
0
 def __init__(
     self,
     name,
     args,
     action,
     manifest,
     set_owner_reference,
     success_condition,
     failure_condition,
     timeout=None,
     retry=None,
     pool=None,
 ):
     Template.__init__(self,
                       name=name,
                       timeout=timeout,
                       retry=retry,
                       pool=pool)
     self.args = args
     self.action = action
     self.manifest = manifest
     self.set_owner_reference = "true" if set_owner_reference else "false"
     self.success_condition = success_condition
     self.failure_condition = failure_condition
示例#6
0
文件: step.py 项目: wujayway/couler
 def __init__(self, name, steps=None):
     Template.__init__(self, name=name)
     self.steps = steps