diff --git a/openpype/cli.py b/openpype/cli.py index 5f0fd1de7b..add9d9d36e 100644 --- a/openpype/cli.py +++ b/openpype/cli.py @@ -152,7 +152,10 @@ def extractenvironments(output_json_path, project, asset, task, app, envgroup, multiple=True) @click.option("-g", "--gui", is_flag=True, help="Show Publish UI", default=False) -def publish(paths, targets, gui): +@click.option( + "--automatic_tests", help="Is this automatic test", default=None +) +def publish(paths, targets, gui, automatic_tests): """Start CLI publishing. Publish collects json from paths provided as an argument. diff --git a/openpype/hosts/nuke/api/plugin.py b/openpype/hosts/nuke/api/plugin.py index 91bb90ff99..a7b0efabee 100644 --- a/openpype/hosts/nuke/api/plugin.py +++ b/openpype/hosts/nuke/api/plugin.py @@ -409,6 +409,8 @@ class ExporterReviewMov(ExporterReview): # create nk path path = os.path.splitext(self.path)[0] + ".nk" # save file to the path + if not os.path.exists(os.path.dirname(path)): + os.makedirs(os.path.dirname(path)) shutil.copyfile(self.instance.context.data["currentFile"], path) self.log.info("Nodes exported...") diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index e67b1cd00e..ab3cd09179 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -266,6 +266,9 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): "--targets", "farm" ] + if os.environ.get("IS_TEST"): + args["automatic_tests"] = "1" + # Generate the payload for Deadline submission payload = { "JobInfo": { diff --git a/tests/lib/db_handler.py b/tests/lib/db_handler.py index 108ebf560d..ae460e310b 100644 --- a/tests/lib/db_handler.py +++ b/tests/lib/db_handler.py @@ -228,12 +228,12 @@ class DBHandler: return query # Examples -# handler = DBHandler(uri="mongodb://localhost:27017") +handler = DBHandler(uri="mongodb://localhost:27017") # # -# backup_dir = "c:\\projects\\test_nuke_publish\\input\\dumps" +backup_dir = "c:\\projects\\test_zips\\test_maya_publish\\input\\dumps" # # # -# handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") -# handler.setup_from_dump("test_db", backup_dir, True, db_name_out="avalon", collection="test_project") +#handler.backup_to_dump("avalon", backup_dir, True, collection="test_project") +handler.setup_from_dump("test_db", backup_dir, True, db_name_out="avalon", collection="test_project") # handler.setup_from_sql_file("test_db", "c:\\projects\\sql\\item.sql", # collection="test_project", # drop=False, mode="upsert")