packtivity
Advanced tools
+1
-1
| [bumpversion] | ||
| current_version = 0.14.22 | ||
| current_version = 0.14.23 | ||
| commit = True | ||
@@ -4,0 +4,0 @@ tag = True |
| Metadata-Version: 2.1 | ||
| Name: packtivity | ||
| Version: 0.14.22 | ||
| Version: 0.14.23 | ||
| Summary: packtivity - general purpose schema + bindings for PROV activities | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/yadage/packtivity |
@@ -124,3 +124,3 @@ import os | ||
| "source": config.container_config.auth_location(), | ||
| "destination": "/recast_auth", | ||
| "destination": config.container_config.auth_targetdir(), | ||
| "readonly": False, | ||
@@ -131,2 +131,11 @@ } | ||
| def determine_auth(environment): | ||
| do_auth = ("GRIDProxy" in environment["resources"]) or ( | ||
| "KRB5Auth" in environment["resources"] | ||
| ) or ({"kerberos": True} in environment["resources"]) | ||
| return do_auth | ||
| def determine_cvmfs(environment): | ||
| return "CVMFS" in environment["resources"] | ||
| def resource_mounts(config, state, environment, log): | ||
@@ -146,8 +155,6 @@ report = """\n\ | ||
| do_cvmfs = "CVMFS" in environment["resources"] | ||
| do_auth = ("GRIDProxy" in environment["resources"]) or ( | ||
| "KRB5Auth" in environment["resources"] | ||
| ) | ||
| do_cvmfs = determine_cvmfs(environment) | ||
| do_auth = determine_auth(environment) | ||
| log.debug("do_auth: %s do_cvmfs: %s", do_auth, do_cvmfs) | ||
| options, mounts = "", [] | ||
@@ -175,2 +182,5 @@ | ||
| env_vars = ' '.join([f"-e {env_entry['name']}='{env_entry['value']}'" for env_entry in race_spec['env']]) | ||
| # docker specific execution modifier | ||
@@ -196,3 +206,3 @@ custom_mod = " {}".format(config.container_config.container_runtime_modifier()) | ||
| return "docker run --rm {stdin} {tty} {cid} {workdir} {custom} {mount_args} {image} {command}".format( | ||
| return "docker run --rm {stdin} {tty} {cid} {workdir} {env_vars} {custom} {mount_args} {image} {command}".format( | ||
| stdin="-i" if race_spec["stdin"] or race_spec["tty"] else "", | ||
@@ -204,2 +214,3 @@ tty="-t" if race_spec["tty"] else "", | ||
| mount_args=mount_args, | ||
| env_vars = env_vars, | ||
| image=race_spec["image"], | ||
@@ -343,2 +354,10 @@ command=quoted_string, | ||
| def environment_spec(config, environment): | ||
| envvar_spec = [] | ||
| if determine_auth(environment): | ||
| envvar_spec.append( | ||
| {'name': 'KRB_SETUP_SCRIPT', 'value': os.path.join(config.container_config.auth_targetdir(),'getkrb.sh')} | ||
| ) | ||
| return envvar_spec | ||
| def race_spec(config, state, environment, log, job): | ||
@@ -366,2 +385,3 @@ if "command" in job: | ||
| rsrcs_opts, rsrcs_mounts = resource_mounts(config, state, environment, log) | ||
| envvar_spec = environment_spec(config,environment) | ||
@@ -375,2 +395,3 @@ return { | ||
| "tty": container_tty, | ||
| "env": envvar_spec | ||
| } | ||
@@ -377,0 +398,0 @@ |
@@ -62,2 +62,7 @@ import yaml | ||
| def auth_targetdir(self): | ||
| env_or_default = os.environ.get( | ||
| "PACKTIVITY_AUTH_TARGETDIR", "/recast_auth" | ||
| ) | ||
| return self.config.get("auth_targetdir", env_or_default) | ||
@@ -64,0 +69,0 @@ class ExecutionConfig(object): |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: packtivity | ||
| Version: 0.14.22 | ||
| Version: 0.14.23 | ||
| Summary: packtivity - general purpose schema + bindings for PROV activities | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/yadage/packtivity |
+1
-1
@@ -25,3 +25,3 @@ import os | ||
| name="packtivity", | ||
| version="0.14.22", | ||
| version="0.14.23", | ||
| description="packtivity - general purpose schema + bindings for PROV activities", | ||
@@ -28,0 +28,0 @@ url="https://github.com/yadage/packtivity", |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
166464
0.58%3561
0.59%