def promote_task( committish: NamedParam, gardenlinux_epoch: NamedParam, snapshot_timestamp: NamedParam, cicd_cfg_name: NamedParam, version: NamedParam, flavourset: NamedParam, promote_target: NamedParam, promote_mode: NamedParam, repodir: NamedParam = _repodir, giturl: NamedParam = _giturl, name='promote-gardenlinux-task', namespace='gardenlinux-tkn', ): clone_step = steps.clone_step( committish=committish, repo_dir=repodir, git_url=giturl, ) promote_step = steps.promote_step( cicd_cfg_name=cicd_cfg_name, flavourset=flavourset, promote_target=promote_target, promote_mode=promote_mode, gardenlinux_epoch=gardenlinux_epoch, committish=committish, version=version, repo_dir=repodir, ) params = [ giturl, committish, gardenlinux_epoch, snapshot_timestamp, cicd_cfg_name, version, flavourset, promote_target, promote_mode, repodir, ] task = tkn.model.Task( metadata=tkn.model.Metadata(name=name, namespace=namespace), spec=tkn.model.TaskSpec( params=params, steps=[ clone_step, promote_step, ], ), ) return task
def promote_task( name='promote-gardenlinux-task', env_vars=[], volumes=[], volume_mounts=[], ): params = [] clone_step, params_step = steps.clone_step( params=all_params, env_vars=env_vars, volume_mounts=volume_mounts, ) params += params_step promote_step, params_step = steps.promote_step( params=all_params, env_vars=env_vars, volume_mounts=volume_mounts, ) params += params_step release_step, params_step = steps.release_step( params=all_params, env_vars=env_vars, volume_mounts=volume_mounts, ) params += params_step build_cd_step, params_step = steps.create_component_descriptor_step( params=all_params, env_vars=env_vars, volume_mounts=volume_mounts, ) params += params_step params = unify_params(params) task = tkn.model.Task( metadata=tkn.model.Metadata(name=name), spec=tkn.model.TaskSpec( params=params, steps=[ clone_step, build_cd_step, promote_step, release_step, ], volumes=volumes, ), ) return task
def promote_task( branch: NamedParam, cicd_cfg_name: NamedParam, committish: NamedParam, flavourset: NamedParam, gardenlinux_epoch: NamedParam, publishing_actions: NamedParam, snapshot_timestamp: NamedParam, version: NamedParam, ctx_repository_config_name: NamedParam, snapshot_ctx_repository_config_name: NamedParam, env_vars=[], giturl: NamedParam = _giturl, name='promote-gardenlinux-task', repodir: NamedParam = _repodir, volumes=[], volume_mounts=[], ): clone_step = steps.clone_step( committish=committish, env_vars=env_vars, git_url=giturl, repo_dir=repodir, volume_mounts=volume_mounts, ) promote_step = steps.promote_step( cicd_cfg_name=cicd_cfg_name, committish=committish, env_vars=env_vars, flavourset=flavourset, gardenlinux_epoch=gardenlinux_epoch, publishing_actions=publishing_actions, repo_dir=repodir, version=version, volume_mounts=volume_mounts, ) release_step = steps.release_step( committish=committish, env_vars=env_vars, gardenlinux_epoch=gardenlinux_epoch, giturl=giturl, publishing_actions=publishing_actions, repo_dir=repodir, volume_mounts=volume_mounts, ) build_cd_step = steps.create_component_descriptor_step( branch=branch, repo_dir=_repodir, committish=committish, version=version, gardenlinux_epoch=gardenlinux_epoch, ctx_repository_config_name=ctx_repository_config_name, snapshot_ctx_repository_config_name=snapshot_ctx_repository_config_name, env_vars=env_vars, publishing_actions=publishing_actions, volume_mounts=volume_mounts, cicd_cfg_name=cicd_cfg_name, ) params = [ branch, cicd_cfg_name, ctx_repository_config_name, snapshot_ctx_repository_config_name, committish, flavourset, gardenlinux_epoch, giturl, publishing_actions, repodir, snapshot_timestamp, version, ] task = tkn.model.Task( metadata=tkn.model.Metadata(name=name), spec=tkn.model.TaskSpec( params=params, steps=[ clone_step, build_cd_step, promote_step, release_step, ], volumes=volumes, ), ) return task