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 <ziad.elhanafy@arm.com>
Loading
Please register or sign in to comment