def create_new_app_from_source(self, image_name, project=None,<EOL>source=None, oc_new_app_args=None):
self.project = project or self.get_current_project()<EOL>name = '<STR_LIT>'.format(random_string=random_str(<NUM_LIT:5>))<EOL>oc_new_app_args = oc_new_app_args or []<EOL>new_image = self.import_image(image_name.split('<STR_LIT:/>')[-<NUM_LIT:1>], image_name)<EOL>c = self._oc_command(<EOL>["<STR_LIT>"] + [new_image + "<STR_LIT>" + source] + oc_new_app_args<EOL>+ ["<STR_LIT>"] + [project] + ["<STR_LIT>" % name])<EOL>logger.info("<STR_LIT>", project)<EOL>try:<EOL><INDENT>o = run_cmd(c, return_output=True)<EOL>logger.debug(o)<EOL><DEDENT>except subprocess.CalledProcessError as ex:<EOL><INDENT>raise ConuException("<STR_LIT>" % ex)<EOL><DEDENT>if os.path.isdir(source):<EOL><INDENT>self.start_build(name, ["<STR_LIT>", project, "<STR_LIT>" % source])<EOL><DEDENT>return name<EOL>
Deploy app using source-to-image in OpenShift cluster using 'oc new-app'
:param image_name: image to be used as builder image
:param project: project where app should be created, default: current project
:param source: source used to extend the image, can be path or url
:param oc_new_app_args: additional parameters for the `oc new-app`
:return: str, name of the app