Skip to content

Commit

Permalink
Merge pull request #8 from ynput/bugfix/staging_in_deadline
Browse files Browse the repository at this point in the history
Pass staging as settings variant
  • Loading branch information
kalisp authored Jul 10, 2024
2 parents d4d8ac5 + 394537c commit d11b188
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,15 @@ def get_job_info(self):
"FTRACK_API_USER",
"FTRACK_SERVER",
"OPENPYPE_SG_USER",
"AYON_BUNDLE_NAME",
"AYON_DEFAULT_SETTINGS_VARIANT",
"AYON_PROJECT_NAME",
"AYON_FOLDER_PATH",
"AYON_TASK_NAME",
"AYON_WORKDIR",
"AYON_APP_NAME",
"AYON_LOG_NO_COLORS",
"AYON_IN_TESTS"
]

environment = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,15 @@ def get_job_info(self, dependency_job_ids=None):
"FTRACK_API_USER",
"FTRACK_SERVER",
"OPENPYPE_SG_USER",
"AYON_BUNDLE_NAME",
"AYON_DEFAULT_SETTINGS_VARIANT",
"AYON_PROJECT_NAME",
"AYON_FOLDER_PATH",
"AYON_TASK_NAME",
"AYON_WORKDIR",
"AYON_APP_NAME",
"AYON_LOG_NO_COLORS",
"AYON_IN_TESTS"
]

environment = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
FileUtils,
DirectoryUtils,
)
__version__ = "1.1.1"
__version__ = "1.1.2"
VERSION_REGEX = re.compile(
r"(?P<major>0|[1-9]\d*)"
r"\.(?P<minor>0|[1-9]\d*)"
Expand Down Expand Up @@ -496,6 +496,13 @@ def inject_ayon_environment(deadlinePlugin):
"extractenvironments",
export_url
]

# staging requires passing argument
# TODO could be switched to env var after https://github.com/ynput/ayon-launcher/issues/123
settings_variant = job.GetJobEnvironmentKeyValue("AYON_DEFAULT_SETTINGS_VARIANT") # noqa
if settings_variant == "staging":
args.append("--use-staging")

# Backwards compatibility for older versions
legacy_args = [
"--headless",
Expand Down

0 comments on commit d11b188

Please sign in to comment.