Add gitlab:git:fsck_projects and gitlab:git:checksum_projects tasks
What does this MR do?
A customer requested the ability to manually validate that a repo on one GitLab instance matches a repo on another GitLab instance.
- Add
rake gitlab:git:fsck_projects
to producegit fsck
output for each project ID given - Add
rake gitlab:git:checksum_projects
to produce the SHA1 hash of these refs for each project ID given
Example usages:
$ gitlab-rake gitlab:git:fsck_projects
1
Performed integrity check for gitlab-org/gitlab-test
^Crake aborted!
Interrupt:
/Users/mkozonogitlab/Developer/gdk/gitlab/lib/tasks/gitlab/git.rake:29:in `each'
/Users/mkozonogitlab/Developer/gdk/gitlab/lib/tasks/gitlab/git.rake:29:in `block (3 levels) in <main>'
Tasks: TOP => gitlab:git:fsck_projects
(See full trace by running task with --trace)
$ cat ~/Downloads/project_ids.txt | gitlab-rake gitlab:git:fsck_projects
Performed integrity check for gitlab-org/gitlab-test
Performed integrity check for gitlab-org/gitlab-shell
Performed integrity check for gnuwget/wget2
Performed integrity check for Commit451/lab-coat
Done
$ gitlab-rake gitlab:git:checksum_projects
1
cfa3f06ba235c13df0bb28e079bcea62c5848af2
2
15c1a23378aef885be8791e2d48abf011852c9ff
^Crake aborted!
Interrupt:
/Users/mkozonogitlab/Developer/gdk/gitlab/lib/tasks/gitlab/git.rake:52:in `each'
/Users/mkozonogitlab/Developer/gdk/gitlab/lib/tasks/gitlab/git.rake:52:in `block (3 levels) in <main>'
Tasks: TOP => gitlab:git:checksum_projects
(See full trace by running task with --trace)
$ cat ~/Downloads/project_ids.txt | gitlab-rake gitlab:git:checksum_projects
cfa3f06ba235c13df0bb28e079bcea62c5848af2
15c1a23378aef885be8791e2d48abf011852c9ff
6d19a286d164aef0be4d0f5bad199763f366e3b2
60a647827e646bed1fc769395b2ea8766796305d
$
$ cat ~/Downloads/project_ids.txt | gitlab-rake gitlab:git:fsck_projects > ~/Downloads/fsck_output
$ cat ~/Downloads/fsck_output
Performed integrity check for gitlab-org/gitlab-test
Performed integrity check for gitlab-org/gitlab-shell
Performed integrity check for gnuwget/wget2
Performed integrity check for Commit451/lab-coat
Done
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Michael Kozono