mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'ci/fix_truncated_backet_names_in_artefact_uploader' into 'master'
ci: fix truncated job name in artifact path See merge request espressif/esp-idf!28558
This commit is contained in:
commit
813dbe5526
@ -1,10 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import fnmatch
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
import typing as t
|
||||
import zipfile
|
||||
from enum import Enum
|
||||
@ -149,7 +149,8 @@ def _upload_files(
|
||||
|
||||
try:
|
||||
if has_file:
|
||||
obj_name = f'{pipeline_id}/{artifact_type.value}/{job_name.rsplit(" ", maxsplit=1)[0]}/{job_id}.zip'
|
||||
job_name_sanitized = re.sub(r' \[\d+]', '', job_name)
|
||||
obj_name = f'{pipeline_id}/{artifact_type.value}/{job_name_sanitized}/{job_id}.zip'
|
||||
print(f'Created archive file: {job_id}.zip, uploading as {obj_name}')
|
||||
|
||||
client.fput_object(getenv('IDF_S3_BUCKET'), obj_name, f'{job_id}.zip')
|
||||
|
Loading…
Reference in New Issue
Block a user