Page MenuHomePhorge

D258.1766748770.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D258.1766748770.diff

diff --git a/lilybuild/lilybuild/ci_steps.py b/lilybuild/lilybuild/ci_steps.py
--- a/lilybuild/lilybuild/ci_steps.py
+++ b/lilybuild/lilybuild/ci_steps.py
@@ -143,6 +143,7 @@
'content': paths,
'items_to_exclude': exclude,
'compression': 'gz',
+ 'limit_bytes': self.lbc.repos[self.repo_id]['artifact_uncompressed_limit'],
}),
workdir=self.work_root_dir,
doStepIf=doStepIf,
@@ -157,7 +158,7 @@
artifact_url = f'{self.artifact_link_base}/plugins/lilybuild_artifacts/builds/{parent_build_id}/jobs/{job_index}/artifacts/{artifact_type}' if self.artifact_link_base else None
upload_artifact_step = steps.FileUpload(
workersrc=artifact_name,
- maxsize=self.artifact_max_size,
+ maxsize=self.lbc.repos[self.repo_id]['artifact_compressed_limit'],
name=f'Upload artifacts: {short_name}',
masterdest=masterdest,
workdir=self.work_root_dir,
@@ -213,7 +214,7 @@
st=self.storage_dir,
job=i,
),
- maxsize=self.artifact_max_size,
+ maxsize=self.lbc.repos[self.repo_id]['artifact_compressed_limit'],
name=f'Download artifacts from job #{i}',
workerdest=self.artifact_file_name,
workdir=self.work_root_dir,
diff --git a/lilybuild/lilybuild/config.py b/lilybuild/lilybuild/config.py
--- a/lilybuild/lilybuild/config.py
+++ b/lilybuild/lilybuild/config.py
@@ -26,6 +26,8 @@
report_phorge = 'phorge'
report_forgejo = 'forgejo'
+default_artifact_uncompressed_limit = 200 * 1024 * 1024
+default_artifact_compressed_limit = 200 * 1024 * 1024
class LilyBuildConfig:
builder_name = 'lilybuild'
@@ -35,7 +37,7 @@
triggerable_scheduler_name = 'lilybuild-triggerable'
force_triggerable_scheduler_name = 'lilybuild-force-triggerable'
- def __init__(self, c, workernames, reports=None, phorge_base_url=None, phorge_token=None, ssh_priv_key=None, ssh_known_hosts=None, storage_dir=default_storage_dir, artifact_link_base=None):
+ def __init__(self, c, workernames, reports=None, phorge_base_url=None, phorge_token=None, ssh_priv_key=None, ssh_known_hosts=None, storage_dir=default_storage_dir, artifact_link_base=None, artifact_uncompressed_limit=None, artifact_compressed_limit=None):
self.c = c
self.poll_interval = 300
self.workernames = workernames
@@ -51,6 +53,8 @@
self.ssh_known_hosts = ssh_known_hosts
self.storage_dir = storage_dir
self.artifact_link_base = normalize_base_url(artifact_link_base)
+ self.artifact_uncompressed_limit = artifact_uncompressed_limit or default_artifact_uncompressed_limit
+ self.artifact_compressed_limit = artifact_compressed_limit or default_artifact_compressed_limit
def configure_factory_and_builder(self):
self.add_lilybuild_builder()
@@ -149,6 +153,8 @@
phorge_token=None,
# Function(build -> dict(str -> str | renderable<str>))
variables_getter=None,
+ artifact_compressed_limit=None,
+ artifact_uncompressed_limit=None,
):
if not alternative_urls:
alternative_urls = []
@@ -161,6 +167,8 @@
'phorge_base_url': normalize_base_url(phorge_base_url) or self.phorge_base_url,
'phorge_token': phorge_token or self.phorge_token,
'variables_getter': variables_getter or (lambda _build: {}),
+ 'artifact_compressed_limit': artifact_compressed_limit or self.artifact_compressed_limit,
+ 'artifact_compressed_limit': artifact_uncompressed_limit or self.artifact_uncompressed_limit,
}
self.record_url(repo_id, repo_url)
for u in alternative_urls:

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 26, 3:32 AM (22 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
838842
Default Alt Text
D258.1766748770.diff (3 KB)

Event Timeline