jolt 0.9.172__py3-none-any.whl → 0.9.435__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.
- jolt/__init__.py +80 -7
- jolt/__main__.py +9 -1
- jolt/bin/fstree-darwin-x86_64 +0 -0
- jolt/bin/fstree-linux-x86_64 +0 -0
- jolt/cache.py +596 -252
- jolt/chroot.py +36 -11
- jolt/cli.py +143 -130
- jolt/common_pb2.py +45 -45
- jolt/config.py +76 -40
- jolt/error.py +19 -4
- jolt/filesystem.py +2 -6
- jolt/graph.py +400 -82
- jolt/influence.py +110 -3
- jolt/loader.py +338 -174
- jolt/log.py +127 -31
- jolt/manifest.py +13 -46
- jolt/options.py +35 -11
- jolt/pkgs/abseil.py +42 -0
- jolt/pkgs/asio.py +25 -0
- jolt/pkgs/autoconf.py +41 -0
- jolt/pkgs/automake.py +41 -0
- jolt/pkgs/b2.py +31 -0
- jolt/pkgs/boost.py +111 -0
- jolt/pkgs/boringssl.py +32 -0
- jolt/pkgs/busybox.py +39 -0
- jolt/pkgs/bzip2.py +43 -0
- jolt/pkgs/cares.py +29 -0
- jolt/pkgs/catch2.py +36 -0
- jolt/pkgs/cbindgen.py +17 -0
- jolt/pkgs/cista.py +19 -0
- jolt/pkgs/clang.py +44 -0
- jolt/pkgs/cli11.py +24 -0
- jolt/pkgs/cmake.py +48 -0
- jolt/pkgs/cpython.py +196 -0
- jolt/pkgs/crun.py +29 -0
- jolt/pkgs/curl.py +38 -0
- jolt/pkgs/dbus.py +18 -0
- jolt/pkgs/double_conversion.py +24 -0
- jolt/pkgs/fastfloat.py +21 -0
- jolt/pkgs/ffmpeg.py +28 -0
- jolt/pkgs/flatbuffers.py +29 -0
- jolt/pkgs/fmt.py +27 -0
- jolt/pkgs/fstree.py +20 -0
- jolt/pkgs/gflags.py +18 -0
- jolt/pkgs/glib.py +18 -0
- jolt/pkgs/glog.py +25 -0
- jolt/pkgs/glslang.py +21 -0
- jolt/pkgs/golang.py +16 -11
- jolt/pkgs/googlebenchmark.py +18 -0
- jolt/pkgs/googletest.py +46 -0
- jolt/pkgs/gperf.py +15 -0
- jolt/pkgs/grpc.py +73 -0
- jolt/pkgs/hdf5.py +19 -0
- jolt/pkgs/help2man.py +14 -0
- jolt/pkgs/inja.py +28 -0
- jolt/pkgs/jsoncpp.py +31 -0
- jolt/pkgs/libarchive.py +43 -0
- jolt/pkgs/libcap.py +44 -0
- jolt/pkgs/libdrm.py +44 -0
- jolt/pkgs/libedit.py +42 -0
- jolt/pkgs/libevent.py +31 -0
- jolt/pkgs/libexpat.py +27 -0
- jolt/pkgs/libfastjson.py +21 -0
- jolt/pkgs/libffi.py +16 -0
- jolt/pkgs/libglvnd.py +30 -0
- jolt/pkgs/libogg.py +28 -0
- jolt/pkgs/libpciaccess.py +18 -0
- jolt/pkgs/libseccomp.py +21 -0
- jolt/pkgs/libtirpc.py +24 -0
- jolt/pkgs/libtool.py +42 -0
- jolt/pkgs/libunwind.py +35 -0
- jolt/pkgs/libva.py +18 -0
- jolt/pkgs/libvorbis.py +33 -0
- jolt/pkgs/libxml2.py +35 -0
- jolt/pkgs/libxslt.py +17 -0
- jolt/pkgs/libyajl.py +16 -0
- jolt/pkgs/llvm.py +81 -0
- jolt/pkgs/lua.py +54 -0
- jolt/pkgs/lz4.py +26 -0
- jolt/pkgs/m4.py +14 -0
- jolt/pkgs/make.py +17 -0
- jolt/pkgs/mesa.py +81 -0
- jolt/pkgs/meson.py +17 -0
- jolt/pkgs/mstch.py +28 -0
- jolt/pkgs/mysql.py +60 -0
- jolt/pkgs/nasm.py +49 -0
- jolt/pkgs/ncurses.py +30 -0
- jolt/pkgs/ng_log.py +25 -0
- jolt/pkgs/ninja.py +45 -0
- jolt/pkgs/nlohmann_json.py +25 -0
- jolt/pkgs/nodejs.py +19 -11
- jolt/pkgs/opencv.py +24 -0
- jolt/pkgs/openjdk.py +26 -0
- jolt/pkgs/openssl.py +103 -0
- jolt/pkgs/paho.py +76 -0
- jolt/pkgs/patchelf.py +16 -0
- jolt/pkgs/perl.py +42 -0
- jolt/pkgs/pkgconfig.py +64 -0
- jolt/pkgs/poco.py +39 -0
- jolt/pkgs/protobuf.py +77 -0
- jolt/pkgs/pugixml.py +27 -0
- jolt/pkgs/python.py +19 -0
- jolt/pkgs/qt.py +35 -0
- jolt/pkgs/rapidjson.py +26 -0
- jolt/pkgs/rapidyaml.py +28 -0
- jolt/pkgs/re2.py +30 -0
- jolt/pkgs/re2c.py +17 -0
- jolt/pkgs/readline.py +15 -0
- jolt/pkgs/rust.py +41 -0
- jolt/pkgs/sdl.py +28 -0
- jolt/pkgs/simdjson.py +27 -0
- jolt/pkgs/soci.py +46 -0
- jolt/pkgs/spdlog.py +29 -0
- jolt/pkgs/spirv_llvm.py +21 -0
- jolt/pkgs/spirv_tools.py +24 -0
- jolt/pkgs/sqlite.py +83 -0
- jolt/pkgs/ssl.py +12 -0
- jolt/pkgs/texinfo.py +15 -0
- jolt/pkgs/tomlplusplus.py +22 -0
- jolt/pkgs/wayland.py +26 -0
- jolt/pkgs/x11.py +58 -0
- jolt/pkgs/xerces_c.py +20 -0
- jolt/pkgs/xorg.py +360 -0
- jolt/pkgs/xz.py +29 -0
- jolt/pkgs/yamlcpp.py +30 -0
- jolt/pkgs/zeromq.py +47 -0
- jolt/pkgs/zlib.py +87 -0
- jolt/pkgs/zstd.py +33 -0
- jolt/plugins/alias.py +3 -0
- jolt/plugins/allure.py +2 -2
- jolt/plugins/autotools.py +66 -0
- jolt/plugins/cache.py +1 -1
- jolt/plugins/cmake.py +74 -6
- jolt/plugins/conan.py +238 -0
- jolt/plugins/cxxinfo.py +7 -0
- jolt/plugins/docker.py +76 -19
- jolt/plugins/email.xslt +141 -118
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +33 -14
- jolt/plugins/gerrit.py +0 -13
- jolt/plugins/git.py +248 -66
- jolt/plugins/googletest.py +1 -1
- jolt/plugins/http.py +1 -1
- jolt/plugins/libtool.py +63 -0
- jolt/plugins/linux.py +990 -0
- jolt/plugins/logstash.py +4 -4
- jolt/plugins/meson.py +61 -0
- jolt/plugins/ninja-compdb.py +96 -28
- jolt/plugins/ninja.py +424 -150
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +131 -87
- jolt/plugins/python.py +137 -0
- jolt/plugins/remote_execution/administration_pb2.py +27 -19
- jolt/plugins/remote_execution/log_pb2.py +12 -12
- jolt/plugins/remote_execution/scheduler_pb2.py +23 -23
- jolt/plugins/remote_execution/worker_pb2.py +19 -19
- jolt/plugins/report.py +7 -2
- jolt/plugins/rust.py +25 -0
- jolt/plugins/scheduler.py +135 -86
- jolt/plugins/selfdeploy/setup.py +6 -6
- jolt/plugins/selfdeploy.py +49 -31
- jolt/plugins/strings.py +35 -22
- jolt/plugins/symlinks.py +11 -4
- jolt/plugins/telemetry.py +1 -2
- jolt/plugins/timeline.py +13 -3
- jolt/scheduler.py +467 -165
- jolt/tasks.py +427 -111
- jolt/templates/timeline.html.template +44 -47
- jolt/timer.py +22 -0
- jolt/tools.py +527 -188
- jolt/utils.py +183 -3
- jolt/version.py +1 -1
- jolt/xmldom.py +12 -2
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/METADATA +97 -41
- jolt-0.9.435.dist-info/RECORD +207 -0
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/WHEEL +1 -1
- jolt/plugins/amqp.py +0 -855
- jolt/plugins/debian.py +0 -338
- jolt/plugins/repo.py +0 -253
- jolt/plugins/snap.py +0 -122
- jolt-0.9.172.dist-info/RECORD +0 -92
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/top_level.txt +0 -0
jolt/plugins/python.py
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
|
+
from jolt import Task
|
|
4
|
+
from jolt import attributes
|
|
3
5
|
from jolt import filesystem as fs
|
|
4
6
|
from jolt.cache import ArtifactStringAttribute
|
|
5
7
|
from jolt.cache import ArtifactAttributeSet
|
|
6
8
|
from jolt.cache import ArtifactAttributeSetProvider
|
|
9
|
+
from jolt.error import raise_task_error_if
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class PythonVariable(ArtifactStringAttribute):
|
|
@@ -98,3 +101,137 @@ class PythonProvider(ArtifactAttributeSetProvider):
|
|
|
98
101
|
|
|
99
102
|
def unapply(self, task, artifact):
|
|
100
103
|
artifact.python.unapply(task, artifact)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@attributes.system
|
|
107
|
+
@attributes.requires("requires_python")
|
|
108
|
+
class PythonEnv(Task):
|
|
109
|
+
"""
|
|
110
|
+
Base class for Python virtual environment tasks.
|
|
111
|
+
|
|
112
|
+
Builds a Python virtual environment and installs specified packages.
|
|
113
|
+
|
|
114
|
+
The venv module from the Python standard library must be available in the
|
|
115
|
+
Python installation used to run the task.
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
abstract = True
|
|
119
|
+
""" This is an abstract base class that should be inherited by concrete tasks. """
|
|
120
|
+
|
|
121
|
+
executable = "python3"
|
|
122
|
+
""" Python executable to use for creating the virtual environment. """
|
|
123
|
+
|
|
124
|
+
requirements = []
|
|
125
|
+
"""
|
|
126
|
+
List of Python packages to install in the virtual environment.
|
|
127
|
+
|
|
128
|
+
Each entry should be a string suitable for pip, e.g., "package==version".
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
def _verify_influence(self, deps, artifact, tools, sources=None):
|
|
132
|
+
# No influence to verify
|
|
133
|
+
return
|
|
134
|
+
|
|
135
|
+
def relocate_scripts(self, artifact, tools, frompath, topath):
|
|
136
|
+
bindir = "Scripts" if self.system == "windows" else "bin"
|
|
137
|
+
|
|
138
|
+
with tools.cwd(artifact.path, bindir):
|
|
139
|
+
for script in tools.glob("*"):
|
|
140
|
+
if script.startswith("python"):
|
|
141
|
+
continue
|
|
142
|
+
tools.replace_in_file(script, frompath, topath)
|
|
143
|
+
|
|
144
|
+
with tools.cwd(artifact.path):
|
|
145
|
+
if not tools.exists("local/bin"):
|
|
146
|
+
return
|
|
147
|
+
with tools.cwd("local", "bin"):
|
|
148
|
+
for script in tools.glob("*"):
|
|
149
|
+
tools.replace_in_file(script, frompath, topath)
|
|
150
|
+
|
|
151
|
+
def publish(self, artifact, tools):
|
|
152
|
+
# Create a parallel installation by copying a Python installation
|
|
153
|
+
|
|
154
|
+
# First locate the Python executable to copy
|
|
155
|
+
py_exe = tools.which(self.executable)
|
|
156
|
+
raise_task_error_if(
|
|
157
|
+
py_exe is None, self,
|
|
158
|
+
f"Python executable '{self.executable}' not found in PATH.",
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Follow symlinks to get the real executable
|
|
162
|
+
py_exe = fs.path.realpath(py_exe)
|
|
163
|
+
|
|
164
|
+
# Determine the Python home directory
|
|
165
|
+
py_home = fs.path.dirname(fs.path.dirname(py_exe))
|
|
166
|
+
|
|
167
|
+
# Determine the Python version
|
|
168
|
+
self.version_major = tools.run(
|
|
169
|
+
[py_exe, "-c", "import sys; print(\"{{}}.{{}}\".format(sys.version_info[0], sys.version_info[1]))"],
|
|
170
|
+
shell=False,
|
|
171
|
+
output_on_error=True).strip()
|
|
172
|
+
|
|
173
|
+
self.info("Python executable: {0}", py_exe)
|
|
174
|
+
self.info("Python home: {0}", py_home)
|
|
175
|
+
self.info("Python version: {0}", self.version_major)
|
|
176
|
+
|
|
177
|
+
# Copy the Python installation to the artifact path
|
|
178
|
+
with tools.cwd(py_home):
|
|
179
|
+
artifact.collect(py_exe, "bin/python3")
|
|
180
|
+
artifact.collect("lib/python3")
|
|
181
|
+
artifact.collect("lib/python{version_major}")
|
|
182
|
+
artifact.collect("lib/libpython{version_major}.*")
|
|
183
|
+
|
|
184
|
+
# Create common symlinks
|
|
185
|
+
if self.system != "windows":
|
|
186
|
+
with tools.cwd(artifact.path, "bin"):
|
|
187
|
+
tools.symlink("python3", "python")
|
|
188
|
+
tools.symlink("python3", "python{version_major}")
|
|
189
|
+
|
|
190
|
+
# Install required packages into the artifact using pip
|
|
191
|
+
with tools.environ(PYTHONHOME=artifact.path):
|
|
192
|
+
py_exe = fs.path.join(artifact.path, "bin", "python3")
|
|
193
|
+
with tools.tmpdir() as tmp, tools.cwd(tmp):
|
|
194
|
+
tools.write_file(
|
|
195
|
+
"requirements.txt",
|
|
196
|
+
"\n".join(self.requirements) + "\n"
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
pip_cmd = [
|
|
200
|
+
py_exe,
|
|
201
|
+
"-m",
|
|
202
|
+
"pip",
|
|
203
|
+
"--isolated",
|
|
204
|
+
"--no-cache-dir",
|
|
205
|
+
"install",
|
|
206
|
+
"-r",
|
|
207
|
+
"requirements.txt",
|
|
208
|
+
"--break-system-packages",
|
|
209
|
+
]
|
|
210
|
+
tools.run(pip_cmd, shell=False)
|
|
211
|
+
|
|
212
|
+
artifact.environ.PATH.append("bin")
|
|
213
|
+
artifact.environ.PATH.append("local/bin")
|
|
214
|
+
artifact.strings.install_prefix = artifact.path
|
|
215
|
+
|
|
216
|
+
def unpack(self, artifact, tools):
|
|
217
|
+
# Relocate the virtual environment by adjusting script paths
|
|
218
|
+
frompath = artifact.strings.install_prefix
|
|
219
|
+
topath = artifact.final_path
|
|
220
|
+
self.relocate_scripts(artifact, tools, frompath, topath)
|
|
221
|
+
|
|
222
|
+
artifact.strings.install_prefix = artifact.final_path
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def requires(python=True):
|
|
226
|
+
""" Decorator to add Python requirements to a task. """
|
|
227
|
+
|
|
228
|
+
import jolt.pkgs.cpython
|
|
229
|
+
|
|
230
|
+
def decorate(cls):
|
|
231
|
+
if python:
|
|
232
|
+
cls = attributes.requires("requires_python")(cls)
|
|
233
|
+
cls.requires_python = ["cpython"]
|
|
234
|
+
|
|
235
|
+
return cls
|
|
236
|
+
|
|
237
|
+
return decorate
|
|
@@ -2,37 +2,45 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: jolt/plugins/remote_execution/administration.proto
|
|
4
4
|
"""Generated protocol buffer code."""
|
|
5
|
-
from google.protobuf.internal import builder as _builder
|
|
6
5
|
from google.protobuf import descriptor as _descriptor
|
|
7
6
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
7
|
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
9
|
# @@protoc_insertion_point(imports)
|
|
10
10
|
|
|
11
11
|
_sym_db = _symbol_database.Default()
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
|
|
15
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
16
|
+
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
15
17
|
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2jolt/plugins/remote_execution/administration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n2jolt/plugins/remote_execution/administration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x11jolt/common.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\"\n\x11ListBuildsRequest\x12\r\n\x05tasks\x18\x01 \x01(\x08\"\xf4\x02\n\x12ListBuildsResponse\x12)\n\x06\x62uilds\x18\x01 \x03(\x0b\x32\x19.ListBuildsResponse.Build\x1aR\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x06status\x18\x03 \x01(\x0e\x32\x0b.TaskStatus\x12\x13\n\x0bhasObserver\x18\x04 \x01(\x08\x1a\xde\x01\n\x05\x42uild\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\x06status\x18\x02 \x01(\x0e\x32\x0c.BuildStatus\x12\'\n\x05tasks\x18\x03 \x03(\x0b\x32\x18.ListBuildsResponse.Task\x12/\n\x0bscheduledAt\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bhasObserver\x18\x05 \x01(\x08\x12\x16\n\x0ehasRunningTask\x18\x06 \x01(\x08\x12\x15\n\rhasQueuedTask\x18\x07 \x01(\x08\x12\r\n\x05ready\x18\x08 \x01(\x08\"\x14\n\x12ListWorkersRequest\"\x80\x02\n\x13ListWorkersResponse\x12,\n\x07workers\x18\x01 \x03(\x0b\x32\x1b.ListWorkersResponse.Worker\x1a=\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1b\n\x06status\x18\x03 \x01(\x0e\x32\x0b.TaskStatus\x1a|\n\x06Worker\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1b\n\x08platform\x18\x02 \x01(\x0b\x32\t.Platform\x12 \n\rtask_platform\x18\x03 \x01(\x0b\x32\t.Platform\x12\'\n\x04task\x18\x04 \x01(\x0b\x32\x19.ListWorkersResponse.Task2\xf9\x01\n\x0e\x41\x64ministration\x12\x38\n\x0b\x43\x61ncelBuild\x12\x13.CancelBuildRequest\x1a\x14.CancelBuildResponse\x12\x35\n\nListBuilds\x12\x12.ListBuildsRequest\x1a\x13.ListBuildsResponse\x12\x38\n\x0bListWorkers\x12\x13.ListWorkersRequest\x1a\x14.ListWorkersResponse\x12<\n\nReschedule\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.EmptyB\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
_builder.
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.administration_pb2', _globals)
|
|
22
25
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
-
|
|
24
|
-
DESCRIPTOR.
|
|
25
|
-
|
|
26
|
-
_LISTBUILDSREQUEST.
|
|
27
|
-
|
|
28
|
-
_LISTBUILDSRESPONSE.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
_LISTBUILDSRESPONSE_BUILD.
|
|
32
|
-
|
|
33
|
-
_LISTWORKERSREQUEST.
|
|
34
|
-
|
|
35
|
-
_LISTWORKERSRESPONSE.
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
_globals['DESCRIPTOR']._options = None
|
|
27
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
28
|
+
_globals['_LISTBUILDSREQUEST']._serialized_start=182
|
|
29
|
+
_globals['_LISTBUILDSREQUEST']._serialized_end=216
|
|
30
|
+
_globals['_LISTBUILDSRESPONSE']._serialized_start=219
|
|
31
|
+
_globals['_LISTBUILDSRESPONSE']._serialized_end=591
|
|
32
|
+
_globals['_LISTBUILDSRESPONSE_TASK']._serialized_start=284
|
|
33
|
+
_globals['_LISTBUILDSRESPONSE_TASK']._serialized_end=366
|
|
34
|
+
_globals['_LISTBUILDSRESPONSE_BUILD']._serialized_start=369
|
|
35
|
+
_globals['_LISTBUILDSRESPONSE_BUILD']._serialized_end=591
|
|
36
|
+
_globals['_LISTWORKERSREQUEST']._serialized_start=593
|
|
37
|
+
_globals['_LISTWORKERSREQUEST']._serialized_end=613
|
|
38
|
+
_globals['_LISTWORKERSRESPONSE']._serialized_start=616
|
|
39
|
+
_globals['_LISTWORKERSRESPONSE']._serialized_end=872
|
|
40
|
+
_globals['_LISTWORKERSRESPONSE_TASK']._serialized_start=284
|
|
41
|
+
_globals['_LISTWORKERSRESPONSE_TASK']._serialized_end=345
|
|
42
|
+
_globals['_LISTWORKERSRESPONSE_WORKER']._serialized_start=748
|
|
43
|
+
_globals['_LISTWORKERSRESPONSE_WORKER']._serialized_end=872
|
|
44
|
+
_globals['_ADMINISTRATION']._serialized_start=875
|
|
45
|
+
_globals['_ADMINISTRATION']._serialized_end=1124
|
|
38
46
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: jolt/plugins/remote_execution/log.proto
|
|
4
4
|
"""Generated protocol buffer code."""
|
|
5
|
-
from google.protobuf.internal import builder as _builder
|
|
6
5
|
from google.protobuf import descriptor as _descriptor
|
|
7
6
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
7
|
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
9
|
# @@protoc_insertion_point(imports)
|
|
10
10
|
|
|
11
11
|
_sym_db = _symbol_database.Default()
|
|
@@ -17,16 +17,16 @@ from jolt import common_pb2 as jolt_dot_common__pb2
|
|
|
17
17
|
|
|
18
18
|
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'jolt/plugins/remote_execution/log.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x11jolt/common.proto\"s\n\x0eReadLogRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12*\n\x06\x62\x65\x66ore\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x05\x61\x66ter\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"9\n\x0fReadLogResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1a\n\x08loglines\x18\x02 \x03(\x0b\x32\x08.LogLine2:\n\x08LogStash\x12.\n\x07ReadLog\x12\x0f.ReadLogRequest\x1a\x10.ReadLogResponse0\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
_builder.
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.log_pb2', _globals)
|
|
22
23
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
-
|
|
24
|
-
DESCRIPTOR.
|
|
25
|
-
|
|
26
|
-
_READLOGREQUEST.
|
|
27
|
-
|
|
28
|
-
_READLOGRESPONSE.
|
|
29
|
-
|
|
30
|
-
_LOGSTASH.
|
|
31
|
-
_LOGSTASH._serialized_end=329
|
|
24
|
+
_globals['DESCRIPTOR']._options = None
|
|
25
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
26
|
+
_globals['_READLOGREQUEST']._serialized_start=95
|
|
27
|
+
_globals['_READLOGREQUEST']._serialized_end=210
|
|
28
|
+
_globals['_READLOGRESPONSE']._serialized_start=212
|
|
29
|
+
_globals['_READLOGRESPONSE']._serialized_end=269
|
|
30
|
+
_globals['_LOGSTASH']._serialized_start=271
|
|
31
|
+
_globals['_LOGSTASH']._serialized_end=329
|
|
32
32
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: jolt/plugins/remote_execution/scheduler.proto
|
|
4
4
|
"""Generated protocol buffer code."""
|
|
5
|
-
from google.protobuf.internal import builder as _builder
|
|
6
5
|
from google.protobuf import descriptor as _descriptor
|
|
7
6
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
7
|
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
9
|
# @@protoc_insertion_point(imports)
|
|
10
10
|
|
|
11
11
|
_sym_db = _symbol_database.Default()
|
|
@@ -14,28 +14,28 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
from jolt import common_pb2 as jolt_dot_common__pb2
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-jolt/plugins/remote_execution/scheduler.proto\x1a\x11jolt/common.proto\"[\n\x0c\x42uildRequest\x12&\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x11.BuildEnvironment\x12\x10\n\x08priority\x18\x02 \x01(\x05\x12\x11\n\tlogstream\x18\x03 \x01(\x08\"=\n\x0b\x42uildUpdate\x12\x1c\n\x06status\x18\x01 \x01(\x0e\x32\x0c.BuildStatus\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t\"&\n\x12\x43\x61ncelBuildRequest\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\"3\n\x13\x43\x61ncelBuildResponse\x12\x1c\n\x06status\x18\x01 \x01(\x0e\x32\x0c.BuildStatus\"0\n\x0bTaskRequest\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x0f\n\x07task_id\x18\x02 \x01(\t\"\
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n-jolt/plugins/remote_execution/scheduler.proto\x1a\x11jolt/common.proto\"[\n\x0c\x42uildRequest\x12&\n\x0b\x65nvironment\x18\x01 \x01(\x0b\x32\x11.BuildEnvironment\x12\x10\n\x08priority\x18\x02 \x01(\x05\x12\x11\n\tlogstream\x18\x03 \x01(\x08\"=\n\x0b\x42uildUpdate\x12\x1c\n\x06status\x18\x01 \x01(\x0e\x32\x0c.BuildStatus\x12\x10\n\x08\x62uild_id\x18\x02 \x01(\t\"&\n\x12\x43\x61ncelBuildRequest\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\"3\n\x13\x43\x61ncelBuildResponse\x12\x1c\n\x06status\x18\x01 \x01(\x0e\x32\x0c.BuildStatus\"0\n\x0bTaskRequest\x12\x10\n\x08\x62uild_id\x18\x01 \x01(\t\x12\x0f\n\x07task_id\x18\x02 \x01(\t\"0\n\x10WorkerAllocation\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08hostname\x18\x02 \x01(\t\"\xa3\x01\n\nTaskUpdate\x12\x1d\n\x07request\x18\x01 \x01(\x0b\x32\x0c.TaskRequest\x12\x1b\n\x06status\x18\x02 \x01(\x0e\x32\x0b.TaskStatus\x12!\n\x06worker\x18\x03 \x01(\x0b\x32\x11.WorkerAllocation\x12\x1a\n\x08loglines\x18\x04 \x03(\x0b\x32\x08.LogLine\x12\x1a\n\x06\x65rrors\x18\x05 \x03(\x0b\x32\n.TaskError2\xa2\x01\n\tScheduler\x12.\n\rScheduleBuild\x12\r.BuildRequest\x1a\x0c.BuildUpdate0\x01\x12\x38\n\x0b\x43\x61ncelBuild\x12\x13.CancelBuildRequest\x1a\x14.CancelBuildResponse\x12+\n\x0cScheduleTask\x12\x0c.TaskRequest\x1a\x0b.TaskUpdate0\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
_builder.
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.scheduler_pb2', _globals)
|
|
21
22
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
22
|
-
|
|
23
|
-
DESCRIPTOR.
|
|
24
|
-
|
|
25
|
-
_BUILDREQUEST.
|
|
26
|
-
|
|
27
|
-
_BUILDUPDATE.
|
|
28
|
-
|
|
29
|
-
_CANCELBUILDREQUEST.
|
|
30
|
-
|
|
31
|
-
_CANCELBUILDRESPONSE.
|
|
32
|
-
|
|
33
|
-
_TASKREQUEST.
|
|
34
|
-
|
|
35
|
-
_WORKERALLOCATION.
|
|
36
|
-
|
|
37
|
-
_TASKUPDATE.
|
|
38
|
-
|
|
39
|
-
_SCHEDULER.
|
|
40
|
-
_SCHEDULER._serialized_end=728
|
|
23
|
+
_globals['DESCRIPTOR']._options = None
|
|
24
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
25
|
+
_globals['_BUILDREQUEST']._serialized_start=68
|
|
26
|
+
_globals['_BUILDREQUEST']._serialized_end=159
|
|
27
|
+
_globals['_BUILDUPDATE']._serialized_start=161
|
|
28
|
+
_globals['_BUILDUPDATE']._serialized_end=222
|
|
29
|
+
_globals['_CANCELBUILDREQUEST']._serialized_start=224
|
|
30
|
+
_globals['_CANCELBUILDREQUEST']._serialized_end=262
|
|
31
|
+
_globals['_CANCELBUILDRESPONSE']._serialized_start=264
|
|
32
|
+
_globals['_CANCELBUILDRESPONSE']._serialized_end=315
|
|
33
|
+
_globals['_TASKREQUEST']._serialized_start=317
|
|
34
|
+
_globals['_TASKREQUEST']._serialized_end=365
|
|
35
|
+
_globals['_WORKERALLOCATION']._serialized_start=367
|
|
36
|
+
_globals['_WORKERALLOCATION']._serialized_end=415
|
|
37
|
+
_globals['_TASKUPDATE']._serialized_start=418
|
|
38
|
+
_globals['_TASKUPDATE']._serialized_end=581
|
|
39
|
+
_globals['_SCHEDULER']._serialized_start=584
|
|
40
|
+
_globals['_SCHEDULER']._serialized_end=746
|
|
41
41
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: jolt/plugins/remote_execution/worker.proto
|
|
4
4
|
"""Generated protocol buffer code."""
|
|
5
|
-
from google.protobuf.internal import builder as _builder
|
|
6
5
|
from google.protobuf import descriptor as _descriptor
|
|
7
6
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
7
|
from google.protobuf import symbol_database as _symbol_database
|
|
8
|
+
from google.protobuf.internal import builder as _builder
|
|
9
9
|
# @@protoc_insertion_point(imports)
|
|
10
10
|
|
|
11
11
|
_sym_db = _symbol_database.Default()
|
|
@@ -15,24 +15,24 @@ from jolt import common_pb2 as jolt_dot_common__pb2
|
|
|
15
15
|
from jolt.plugins.remote_execution import scheduler_pb2 as jolt_dot_plugins_dot_remote__execution_dot_scheduler__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*jolt/plugins/remote_execution/worker.proto\x1a\x11jolt/common.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\xaf\x01\n\rWorkerRequest\x12%\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x15.WorkerRequest.Action\x12\x1c\n\x05\x62uild\x18\x02 \x01(\x0b\x32\r.BuildRequest\x12\x11\n\tworker_id\x18\x03 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x04 \x01(\t\"4\n\x06\x41\x63tion\x12\t\n\x05\x42UILD\x10\x00\x12\x10\n\x0c\x43\x41NCEL_BUILD\x10\x01\x12\r\n\tTERMINATE\x10\x02\"\
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*jolt/plugins/remote_execution/worker.proto\x1a\x11jolt/common.proto\x1a-jolt/plugins/remote_execution/scheduler.proto\"\xaf\x01\n\rWorkerRequest\x12%\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x15.WorkerRequest.Action\x12\x1c\n\x05\x62uild\x18\x02 \x01(\x0b\x32\r.BuildRequest\x12\x11\n\tworker_id\x18\x03 \x01(\t\x12\x10\n\x08\x62uild_id\x18\x04 \x01(\t\"4\n\x06\x41\x63tion\x12\t\n\x05\x42UILD\x10\x00\x12\x10\n\x0c\x43\x41NCEL_BUILD\x10\x01\x12\r\n\tTERMINATE\x10\x02\"\xf1\x01\n\x0cWorkerUpdate\x12$\n\x06status\x18\x01 \x01(\x0e\x32\x14.WorkerUpdate.Status\x12\x1b\n\x08platform\x18\x02 \x01(\x0b\x32\t.Platform\x12 \n\rtask_platform\x18\x04 \x01(\x0b\x32\t.Platform\x12\x1b\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x0c.WorkerError\"_\n\x06Status\x12\r\n\tENLISTING\x10\x00\x12\r\n\tDELISTING\x10\x01\x12\x0f\n\x0b\x42UILD_ENDED\x10\x02\x12\x11\n\rDEPLOY_FAILED\x10\x03\x12\x13\n\x0f\x45XECUTOR_FAILED\x10\x04\"/\n\x0bWorkerError\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x0f\n\x07\x64\x65tails\x18\x02 \x01(\t2i\n\x06Worker\x12\x34\n\x0fGetInstructions\x12\r.WorkerUpdate\x1a\x0e.WorkerRequest(\x01\x30\x01\x12)\n\x08GetTasks\x12\x0b.TaskUpdate\x1a\x0c.TaskRequest(\x01\x30\x01\x42\x0eZ\x0cpkg/protocolb\x06proto3')
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
_builder.
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jolt.plugins.remote_execution.worker_pb2', _globals)
|
|
22
23
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
-
|
|
24
|
-
DESCRIPTOR.
|
|
25
|
-
|
|
26
|
-
_WORKERREQUEST.
|
|
27
|
-
|
|
28
|
-
_WORKERREQUEST_ACTION.
|
|
29
|
-
|
|
30
|
-
_WORKERUPDATE.
|
|
31
|
-
|
|
32
|
-
_WORKERUPDATE_STATUS.
|
|
33
|
-
|
|
34
|
-
_WORKERERROR.
|
|
35
|
-
|
|
36
|
-
_WORKER.
|
|
37
|
-
_WORKER._serialized_end=654
|
|
24
|
+
_globals['DESCRIPTOR']._options = None
|
|
25
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\014pkg/protocol'
|
|
26
|
+
_globals['_WORKERREQUEST']._serialized_start=113
|
|
27
|
+
_globals['_WORKERREQUEST']._serialized_end=288
|
|
28
|
+
_globals['_WORKERREQUEST_ACTION']._serialized_start=236
|
|
29
|
+
_globals['_WORKERREQUEST_ACTION']._serialized_end=288
|
|
30
|
+
_globals['_WORKERUPDATE']._serialized_start=291
|
|
31
|
+
_globals['_WORKERUPDATE']._serialized_end=532
|
|
32
|
+
_globals['_WORKERUPDATE_STATUS']._serialized_start=437
|
|
33
|
+
_globals['_WORKERUPDATE_STATUS']._serialized_end=532
|
|
34
|
+
_globals['_WORKERERROR']._serialized_start=534
|
|
35
|
+
_globals['_WORKERERROR']._serialized_end=581
|
|
36
|
+
_globals['_WORKER']._serialized_start=583
|
|
37
|
+
_globals['_WORKER']._serialized_end=688
|
|
38
38
|
# @@protoc_insertion_point(module_scope)
|
jolt/plugins/report.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from contextlib import contextmanager
|
|
2
2
|
|
|
3
|
+
from jolt import common_pb2 as common_pb
|
|
3
4
|
from jolt.hooks import TaskHook, TaskHookFactory
|
|
4
5
|
from jolt.manifest import JoltManifest
|
|
5
6
|
|
|
@@ -37,7 +38,10 @@ class ReportHooks(TaskHook):
|
|
|
37
38
|
|
|
38
39
|
def task_failed(self, task):
|
|
39
40
|
with task.task.report() as report:
|
|
40
|
-
|
|
41
|
+
if task.status() == common_pb.TaskStatus.TASK_FAILED:
|
|
42
|
+
self.finalize_report(report.manifest, task, "FAILED")
|
|
43
|
+
elif task.status() == common_pb.TaskStatus.TASK_CANCELLED:
|
|
44
|
+
self.finalize_report(report.manifest, task, "CANCELLED")
|
|
41
45
|
|
|
42
46
|
def task_unstable(self, task):
|
|
43
47
|
with task.task.report() as report:
|
|
@@ -54,7 +58,8 @@ class ReportHooks(TaskHook):
|
|
|
54
58
|
raise e
|
|
55
59
|
else:
|
|
56
60
|
with task.task.report() as report:
|
|
57
|
-
|
|
61
|
+
if task.status() == common_pb.TaskStatus.TASK_PASSED:
|
|
62
|
+
self.finalize_report(report.manifest, task, "SUCCESS")
|
|
58
63
|
|
|
59
64
|
def write(self, filename):
|
|
60
65
|
self.manifest.write(filename)
|
jolt/plugins/rust.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from jolt import attributes, Task
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@attributes.common_metadata()
|
|
5
|
+
class Rust(Task):
|
|
6
|
+
""" Base class for Rust-based build tasks. """
|
|
7
|
+
|
|
8
|
+
abstract = True
|
|
9
|
+
|
|
10
|
+
srcdir = None
|
|
11
|
+
"""
|
|
12
|
+
Source directory for the Rust project.
|
|
13
|
+
|
|
14
|
+
If None, defaults to the task work directory (joltdir).
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def run(self, deps, tools):
|
|
18
|
+
self.builddir = tools.builddir(incremental=True)
|
|
19
|
+
self.installdir = tools.builddir("install")
|
|
20
|
+
with tools.cwd(self.srcdir or self.joltdir):
|
|
21
|
+
tools.run("cargo install --path . --target-dir={builddir} --root={installdir}")
|
|
22
|
+
|
|
23
|
+
def publish(self, artifact, tools):
|
|
24
|
+
with tools.cwd(self.installdir):
|
|
25
|
+
artifact.collect("*", symlinks=True)
|