Skip to content
Commit ba6dbfa1 authored by Ziad Elhanafy's avatar Ziad Elhanafy Committed by Drew Reed
Browse files

ci: Set Git strategy to do a full cloning

Gitlab CI by default just fetches 20 commits
from the repository and doesn't do a full clone.

If we have files which were not changed for a long time
(Before those 20 fetched commits).
When codeclimate-headercheck runs and it calls this BQA tools method:
https://gitlab.oss.arm.com/engineering/ais/bqa-tools/-/blob/main/tools/qa-checks/header_check.py#L294


It tries to get the history for each file
(Which was last changed before those 20 commits),
the method fails and it goes to the last return statement
"return time.gmtime(os.path.getmtime(path))"
which just gives the file's local time in which it was cloned,
so it gives the error saying
"Copyright final year doesn't match the file's last modification"
Because it thinks the file was modified in the current year
but in reality it was not.

Set GIT_STRATEGY variable to clone and set
GIT_DEPTH to 0 to clone the complete history of the
repository.

Signed-off-by: Ziad Elhanafy's avatarZiad Elhanafy <ziad.elhanafy@arm.com>
parent 42793733
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment