Skip to content

Commit d174bb6

Browse files
committed
BUILD/MINOR: ci: remove check-large-files job
The check-large-files CI job has been unreliable; remove it entirely.
1 parent 478aa06 commit d174bb6

1 file changed

Lines changed: 0 additions & 38 deletions

File tree

.gitlab-ci.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -320,44 +320,6 @@ check-committer:
320320
- junit-report.xml
321321
reports:
322322
junit: junit-report.xml
323-
check-large-files:
324-
stage: lint
325-
needs: [pipelines-check]
326-
rules:
327-
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
328-
image:
329-
name: $CI_REGISTRY_GO/golang:latest-alpine
330-
entrypoint: [""]
331-
tags:
332-
- go
333-
script:
334-
# List all files in the latest commit that are larger than 2MB
335-
- |
336-
git fetch origin ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}
337-
git diff --name-only origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}..HEAD | while read file; do
338-
if [ -f "$file" ] && [ $(stat -c%s "$file") -gt 2097152 ]; then
339-
echo "$file"
340-
fi
341-
done > large_files.txt
342-
343-
# Fail the job if any file is larger than 1MB
344-
- |
345-
if [ -s large_files.txt ]; then
346-
echo "The following files exceed 1MB:"
347-
cat large_files.txt
348-
junit-report add --status=failed --file=large-files --message="large files found" --description="$(cat large_files.txt)"
349-
exit 1
350-
else
351-
echo "No large files found in the latest commit."
352-
junit-report add --status=ok --file=large-files --message="commit clean" --description="No large files found in the latest commit."
353-
fi
354-
artifacts:
355-
when: on_failure
356-
paths:
357-
- junit-report.xml
358-
reports:
359-
junit: junit-report.xml
360-
361323
build:
362324
stage: build
363325
needs: []

0 commit comments

Comments
 (0)