0

I am trying to set up a CI/CD pipeline where once the developer pushes the local to a remote dev repository in GIT LAB the code review process should take place. I was able to link the GITLAB repo with jenkins earlier so that when a code is pushed towards the git repo the code is build in jenkins automatically using the the trigger. But now i am checking whether the same test and build process can be done within the GITLAB interface with the help of any plugins. The initial code review process can be automated this way and later deployed to the required environment.

Does the gitlab have any automatic code review process? For example, When a developer pushes the branch to the remote repository, Do we have any option where we could have an automatic code review process which checks the basic coding standards and later a maintainer can accept the merge request if it satisfies the code quality standards.

1) I have used Jenkins but not sure whether I will be able to test the code and automatically review the code using Jenkins.

2) I have tried using gitlab CI (By Adding contents to '.gitlab-ci.yml' file) but the pipeline fails each time with different package dependencies as I am not sure what the contents need to add to '.gitlab-ci.yml' for code review in case if it is a Drupal or Magento code.

TIA.

  • Your question is a little bit too broad. Please read the documentation first, and ask a specific question about problems you are having. This is all well-documented, so please do some research on the feature before: https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html – slhck Jun 24 '19 at 09:31
  • I have already read many documentations on the code review part but was not able to find any automatic code review option in the gitlab CE version. Does the gitlab have any automatic code review process? – Sandeep S Jun 24 '19 at 09:43
  • For CE, this is not built-in, no, but nothing prevents you from building a CI pipeline that runs whatever code checking tool you want to use. You should clarify your question to show what you have found already and why it does not work. – slhck Jun 24 '19 at 10:19
  • Thank you for the update. I am trying to set up a CI/CD pipeline where once the developer pushes the local to a remote dev repository in GIT LAB the code review process should take place. I was able to link the GITLAB repo with jenkins earlier so that when a code is pushed towards the git repo the code is build in jenkins automatically using the the trigger. But now i am checking whether the same test and build process can be done within the GITLAB interface with the help of any plugins. The initial code review process can be automated this way and later deployed to the required environment. – Sandeep S Jun 24 '19 at 12:55
  • GitLab itself has a CI pipeline, so you don't need Jenkins for that: https://about.gitlab.com/devops-tools/jenkins-vs-gitlab.html — please [edit] your question to include all this information. Have you tried setting up a GitLab CI pipeline? I recommend you have a look at that. – slhck Jun 24 '19 at 12:59
  • Thank you. I have added the steps to the question as mentioned. Yes, I have tried using gitlab CI (By Adding contents to '.gitlab-ci.yml' file) but the pipeline fails each time with different package dependencies as i am not sure what the contents need to added to '.gitlab-ci.yml' for code review incase if it is a Drupal or Magento code. – Sandeep S Jun 24 '19 at 13:26
  • 1
    "I am not sure what the contents need to add to '.gitlab-ci.yml'" - this is the problem. It will only do what you tell it to. Read documentation, think about your needs, use GitLab CI. – gronostaj Jun 24 '19 at 13:32

0 Answers0