opentf-toolkit-nightly 0.59.0.dev1214__py3-none-any.whl → 0.59.0.dev1221__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opentf/commons/selectors.py +1 -1
- opentf/toolkit/channels.py +12 -13
- {opentf_toolkit_nightly-0.59.0.dev1214.dist-info → opentf_toolkit_nightly-0.59.0.dev1221.dist-info}/METADATA +1 -1
- {opentf_toolkit_nightly-0.59.0.dev1214.dist-info → opentf_toolkit_nightly-0.59.0.dev1221.dist-info}/RECORD +7 -7
- {opentf_toolkit_nightly-0.59.0.dev1214.dist-info → opentf_toolkit_nightly-0.59.0.dev1221.dist-info}/LICENSE +0 -0
- {opentf_toolkit_nightly-0.59.0.dev1214.dist-info → opentf_toolkit_nightly-0.59.0.dev1221.dist-info}/WHEEL +0 -0
- {opentf_toolkit_nightly-0.59.0.dev1214.dist-info → opentf_toolkit_nightly-0.59.0.dev1221.dist-info}/top_level.txt +0 -0
opentf/commons/selectors.py
CHANGED
opentf/toolkit/channels.py
CHANGED
|
@@ -323,6 +323,12 @@ def process_output(
|
|
|
323
323
|
) -> Dict[str, Any]:
|
|
324
324
|
"""Process output, filling structures.
|
|
325
325
|
|
|
326
|
+
`event` is expected to have its metadata enriched with the following
|
|
327
|
+
fields:
|
|
328
|
+
|
|
329
|
+
- channel_os: the runner OS
|
|
330
|
+
- channel_temp: the temporary directory on the runner
|
|
331
|
+
|
|
326
332
|
# Required parameters
|
|
327
333
|
|
|
328
334
|
- event: an ExecutionCommand event
|
|
@@ -330,7 +336,6 @@ def process_output(
|
|
|
330
336
|
- stdout: a list of strings
|
|
331
337
|
- stderr: a list of strings
|
|
332
338
|
- jobstate: a JobState object
|
|
333
|
-
- context: a dictionary, channelhandler context
|
|
334
339
|
- _get: a function copying a remote file to a local path
|
|
335
340
|
- _put: a function copying a local file to a remote environment
|
|
336
341
|
|
|
@@ -428,6 +433,9 @@ def process_output(
|
|
|
428
433
|
|
|
429
434
|
metadata: Dict[str, Any] = event['metadata']
|
|
430
435
|
is_windows: bool = metadata['channel_os'] == 'windows'
|
|
436
|
+
opentfvariables = VARIABLES_TEMPLATE[metadata['channel_os']].format(
|
|
437
|
+
job_id=metadata['job_id'], root=metadata['channel_temp']
|
|
438
|
+
)
|
|
431
439
|
separator = '\\' if is_windows else '/'
|
|
432
440
|
outputs = {}
|
|
433
441
|
logs: List[str] = []
|
|
@@ -466,6 +474,9 @@ def process_output(
|
|
|
466
474
|
if metadata.get('artifacts'):
|
|
467
475
|
del metadata['artifacts']
|
|
468
476
|
|
|
477
|
+
if metadata['step_sequence_id'] != CHANNEL_RELEASE:
|
|
478
|
+
_attach(opentfvariables, f'type={OPENTF_VARIABLES_TYPE}')
|
|
479
|
+
|
|
469
480
|
result = make_event(EXECUTIONRESULT, metadata=metadata, status=resp)
|
|
470
481
|
|
|
471
482
|
if outputs:
|
|
@@ -480,17 +491,6 @@ def process_output(
|
|
|
480
491
|
return result
|
|
481
492
|
|
|
482
493
|
|
|
483
|
-
def _attach_opentf_variables(runner_os: str, script: List[str]):
|
|
484
|
-
if runner_os == 'windows':
|
|
485
|
-
script.append(
|
|
486
|
-
f'@if exist "%OPENTF_VARIABLES%" echo ::attach type={OPENTF_VARIABLES_TYPE}::%OPENTF_VARIABLES%'
|
|
487
|
-
)
|
|
488
|
-
else:
|
|
489
|
-
script.append(
|
|
490
|
-
f'if [ -f "$OPENTF_VARIABLES" ]; then echo "::attach type={OPENTF_VARIABLES_TYPE}::"$OPENTF_VARIABLES""; fi'
|
|
491
|
-
)
|
|
492
|
-
|
|
493
|
-
|
|
494
494
|
def _export_opentf_workspace(runner_os: str, workspace: str, script: List[str]) -> None:
|
|
495
495
|
opentf_workspace = WORKSPACE_TEMPLATE[runner_os].format(workspace=workspace)
|
|
496
496
|
if runner_os == 'windows':
|
|
@@ -675,7 +675,6 @@ def make_script(
|
|
|
675
675
|
_maybe_create_workspace(metadata, runner_os, step_sequence_id, script)
|
|
676
676
|
_make_prolog(runner_os, job_id, step_sequence_id, root, script, command)
|
|
677
677
|
_maybe_change_directory(command, runner_os, script, prefix)
|
|
678
|
-
_attach_opentf_variables(runner_os, script)
|
|
679
678
|
|
|
680
679
|
if command.get('shell') in (None, SHELL_DEFAULT[runner_os]):
|
|
681
680
|
script += command['scripts']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: opentf-toolkit-nightly
|
|
3
|
-
Version: 0.59.0.
|
|
3
|
+
Version: 0.59.0.dev1221
|
|
4
4
|
Summary: OpenTestFactory Orchestrator Toolkit
|
|
5
5
|
Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
|
|
6
6
|
Author: Martin Lafaix
|
|
@@ -5,7 +5,7 @@ opentf/commons/datasources.py,sha256=GSbjrYnZQup2B3r7T7l3C_o6R2jS13nQiu6dRitoenk
|
|
|
5
5
|
opentf/commons/expressions.py,sha256=jM_YKXVOFhvOE2aE2IuacuvxhIsOYTFs2oQkpcbWR6g,19645
|
|
6
6
|
opentf/commons/pubsub.py,sha256=M0bvajR9raUP-xe5mfRjdrweZyHQw1_Qsy56gS-Sck4,7676
|
|
7
7
|
opentf/commons/schemas.py,sha256=cjyPXRhRIPQauCdy9zGRaOkqdVcklz47JnljTTLNpq8,4254
|
|
8
|
-
opentf/commons/selectors.py,sha256=
|
|
8
|
+
opentf/commons/selectors.py,sha256=8_SeCm5pS5rWARwt1amOjdwNXwfPd5NOoyz4OZrniZo,7135
|
|
9
9
|
opentf/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
opentf/schemas/abac.opentestfactory.org/v1alpha1/Policy.json,sha256=JXsfNAPSEYggeyaDutSQBeG38o4Bmcr70dPLWWeqIh8,2105
|
|
11
11
|
opentf/schemas/opentestfactory.org/v1/ExecutionCommand.json,sha256=UtmAlTaYdPSZDeQnx-ocX8IonyEPWoNmgDkHwQwQxWE,4126
|
|
@@ -56,10 +56,10 @@ opentf/schemas/opentestfactory.org/v1beta2/ServiceConfig.json,sha256=rEvK2YWL5lG
|
|
|
56
56
|
opentf/scripts/launch_java_service.sh,sha256=S0jAaCuv2sZy0Gf2NGBuPX-eD531rcM-b0fNyhmzSjw,2423
|
|
57
57
|
opentf/scripts/startup.py,sha256=sggwEpMx7PTaSgYzs-2uCF5YZzpsncMyTlfF_G60CrE,21518
|
|
58
58
|
opentf/toolkit/__init__.py,sha256=mYeJPZ92ulbTBItqEsZgF4nnuRh6G19QPY3Jxc92ifc,23028
|
|
59
|
-
opentf/toolkit/channels.py,sha256=
|
|
59
|
+
opentf/toolkit/channels.py,sha256=lqFGQiHYiGMaYuGAXmbyaIsW2B_9KlaUTF8LiUIQOAg,23399
|
|
60
60
|
opentf/toolkit/core.py,sha256=cscUkwdwvLkerqMRL05dgtKJ42QbBQQc28kRBiyZM9o,9883
|
|
61
|
-
opentf_toolkit_nightly-0.59.0.
|
|
62
|
-
opentf_toolkit_nightly-0.59.0.
|
|
63
|
-
opentf_toolkit_nightly-0.59.0.
|
|
64
|
-
opentf_toolkit_nightly-0.59.0.
|
|
65
|
-
opentf_toolkit_nightly-0.59.0.
|
|
61
|
+
opentf_toolkit_nightly-0.59.0.dev1221.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
62
|
+
opentf_toolkit_nightly-0.59.0.dev1221.dist-info/METADATA,sha256=Vpu0PnqxyOxphIAfhWnlnZqWzwd8iXdAGth9rM-nqxM,1940
|
|
63
|
+
opentf_toolkit_nightly-0.59.0.dev1221.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
64
|
+
opentf_toolkit_nightly-0.59.0.dev1221.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
|
|
65
|
+
opentf_toolkit_nightly-0.59.0.dev1221.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|