Skip to content

Commit ea20a3d

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 <[email protected]>
1 parent dc2121e commit ea20a3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.gitlab-ci.yml

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

0 commit comments

Comments
 (0)