forked from espressif/esp-idf
ci: upload size info, and build junit report
This commit is contained in:
@@ -53,6 +53,7 @@ TYPE_PATTERNS_DICT = {
|
|||||||
],
|
],
|
||||||
ArtifactType.JUNIT_REPORTS: [
|
ArtifactType.JUNIT_REPORTS: [
|
||||||
'XUNIT_RESULT*.xml',
|
'XUNIT_RESULT*.xml',
|
||||||
|
'build_summary*.xml',
|
||||||
],
|
],
|
||||||
ArtifactType.MODIFIED_FILES_AND_COMPONENTS_REPORT: [
|
ArtifactType.MODIFIED_FILES_AND_COMPONENTS_REPORT: [
|
||||||
'pipeline.env',
|
'pipeline.env',
|
||||||
|
@@ -59,6 +59,9 @@ class AppUploader(AppDownloader):
|
|||||||
ArtifactType.LOGS: [
|
ArtifactType.LOGS: [
|
||||||
DEFAULT_BUILD_LOG_FILENAME,
|
DEFAULT_BUILD_LOG_FILENAME,
|
||||||
],
|
],
|
||||||
|
ArtifactType.SIZE_REPORTS: [
|
||||||
|
'**/build*/size.json',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, pipeline_id: t.Union[str, int, None] = None) -> None:
|
def __init__(self, pipeline_id: t.Union[str, int, None] = None) -> None:
|
||||||
@@ -91,7 +94,6 @@ class AppUploader(AppDownloader):
|
|||||||
try:
|
try:
|
||||||
if has_file:
|
if has_file:
|
||||||
obj_name = self.get_app_object_name(app_path, zip_filename, artifact_type)
|
obj_name = self.get_app_object_name(app_path, zip_filename, artifact_type)
|
||||||
print(f'Created archive file: {zip_filename}, uploading as {obj_name}')
|
|
||||||
self._client.fput_object(getenv('IDF_S3_BUCKET'), obj_name, zip_filename)
|
self._client.fput_object(getenv('IDF_S3_BUCKET'), obj_name, zip_filename)
|
||||||
uploaded = True
|
uploaded = True
|
||||||
finally:
|
finally:
|
||||||
@@ -101,14 +103,13 @@ class AppUploader(AppDownloader):
|
|||||||
def upload_app(self, app_build_path: str, artifact_type: t.Optional[ArtifactType] = None) -> None:
|
def upload_app(self, app_build_path: str, artifact_type: t.Optional[ArtifactType] = None) -> None:
|
||||||
uploaded = False
|
uploaded = False
|
||||||
if not artifact_type:
|
if not artifact_type:
|
||||||
for _artifact_type in [
|
upload_types: t.Iterable[ArtifactType] = self.TYPE_PATTERNS_DICT.keys()
|
||||||
ArtifactType.MAP_AND_ELF_FILES,
|
|
||||||
ArtifactType.BUILD_DIR_WITHOUT_MAP_AND_ELF_FILES,
|
|
||||||
ArtifactType.LOGS,
|
|
||||||
]:
|
|
||||||
uploaded |= self._upload_app(app_build_path, _artifact_type)
|
|
||||||
else:
|
else:
|
||||||
uploaded = self._upload_app(app_build_path, artifact_type)
|
upload_types = [artifact_type]
|
||||||
|
|
||||||
|
print(f'Uploading {app_build_path} {[k.value for k in upload_types]} to minio server')
|
||||||
|
for upload_type in upload_types:
|
||||||
|
uploaded |= self._upload_app(app_build_path, upload_type)
|
||||||
|
|
||||||
if uploaded:
|
if uploaded:
|
||||||
rmdir(app_build_path, exclude_file_patterns=DEFAULT_BUILD_LOG_FILENAME)
|
rmdir(app_build_path, exclude_file_patterns=DEFAULT_BUILD_LOG_FILENAME)
|
||||||
|
Reference in New Issue
Block a user