Skip to content

Commit 4935bca

Browse files
committed
ci: Refine artifact upload process in gitlab CI/CD
- Exclude `buildroot/dl/toolchain-external-custom` from the zip to avoid 413 errors. - Improve clarity in comments. Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent 1091d3c commit 4935bca

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.gitlab-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,11 @@ release_sources:
321321
- echo "Copy ${snapshot_zip} to ${linuxsdk_zip}"
322322
- cp -f ${snapshot_zip} ${linuxsdk_zip}
323323
# try to workaround ERROR: Uploading artifacts as "archive" to coordinator... 413 Request Entity Too Large
324-
# when uploading artifacts
324+
# when uploading artifacts, must exclude buildroot/dl/toolchain-external-custom/ folder
325+
# because in gitlab-runner jobs, it is cached and many different versions are cached, this folder size is very big
326+
# so it can easily exceed Maximum artifacts size(MB) settings in admin ci_cd page
325327
- echo "Adding buildroot/dl folder into ${linuxsdk_zip}"
326-
- zip -ur ${linuxsdk_zip} buildroot/dl
328+
- zip -9 -ur ${linuxsdk_zip} buildroot/dl -x "buildroot/dl/toolchain-external-custom/*"
327329
- ls -lh linuxsdk_*.zip
328330
artifacts:
329331
name: "nuclei_linuxsdk-job${CI_JOB_ID}_${CI_COMMIT_SHA::8}"

0 commit comments

Comments
 (0)