gerrit

Why does Gerrit not include the change-id into merge commits?

北城以北 提交于 2019-11-27 18:24:13
so the git hook only puts change Id into commits. Although merge commits can be pushed to review branch even Gerrit is configured to require Change-Id in the commit messages. And when a merge commit has been pushed all the subsequent commit will depends on the merge commit - since there is no change Id. So what is the purpose not to include change Id into merge commit? The underlying problem in Git is that commit-msg hooks are not called for merge commits without conflicts. However, the prepare-commit-msg is called for (any) merge commits. So what I currently do to get Gerrit's Change-Id also

Can't find 'Label Verified' permission in gerrit 2.7

落花浮王杯 提交于 2019-11-27 17:52:14
问题 I'm trying to configure Jenkins gerrit trigger following this instructions: https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger. One point says to grant 'Label verified' permission to Non-intractive users. The problem is, I don't see such a privilege... 'Add permission...' combo box has 'Label Code-review' permission but not 'Label verified'. Was this permission removed/renamed from gerrit 2.7? Will this plugin work if I don't set it? 回答1: Indeed the "Verified label" was removed. You

What environment variables are passed to Jenkins when using the Gerrit Trigger Plugin?

旧巷老猫 提交于 2019-11-27 14:57:34
问题 I'm using the Gerrit Trigger Plugin to kick off Jenkins builds, but haven't found a good place where all of the environment variables are documented. Does such documentation exist? 回答1: As a start, I had a Jenkins build shell script dump all environment variables with GERRIT in the name: GERRIT_PATCHSET_UPLOADER=\"Alan Thompson\" <theEmail@gmail.com> GERRIT_PATCHSET_REVISION=eec3b0b65fcdf30872befa2e9ace06e96cd487b4 GERRIT_CHANGE_ID=Ieec3b0b65fcdf30872befa2e9ace06e96cd487b4 GERRIT_PATCHSET

git alias for HEAD:refs/for/master

怎甘沉沦 提交于 2019-11-27 11:03:21
I am configuring Gerrit and I would like to avoid writing: git push gerrit HEAD:refs/for/master I would like to write: git push review I am sure it's possible modifying .git/config but I can't make it work. Alex Brown I set up two different push types, review and noreview: for reviews: git config remote.review.pushurl ssh://<GERRIT_HOST>:29418/<PROJECT_PATH>.git git config remote.review.push refs/heads/*:refs/for/* git push review # this will push your current branch up for review to bypass review: git config remote.noreview.pushurl ssh://<GERRIT_HOST>:29418/<PROJECT_PATH>.git git config

How to install/config Git::Hooks to use with Gerrit

回眸只為那壹抹淺笑 提交于 2019-11-27 06:28:22
问题 The Git::Hooks is a Perl framework for implementing Git/Gerrit hooks. What is the procedure to install and config it to use with Gerrit? 回答1: Installation 1) Install dependencies: Ubuntu: sudo apt-get install gcc make libcrypt-ssleay-perl Red Hat: sudo yum install gcc make libcrypt-ssleay-perl 2) Install Git::Hooks: sudo cpanm Git::Hooks sudo cpanm Gerrit::REST sudo cpanm JIRA::REST Configuration 0) Be sure you have the hooks plugin installed in Gerrit. 1) Create the Gerrit hooks patchset

配置sonar、jenkins进行持续集成和代码审查

◇◆丶佛笑我妖孽 提交于 2019-11-27 05:58:13
本文以CentOS操作系统为例介绍Sonar的安装配置,以及如何与Jenkins进行集成,通过pmd-cpd、checkstyle、findbugs等工具对代码进行持续审查。 一、安装配置sonar 1、Sonar介绍 Sonar是一个用于代码质量管理的开源平台,用于管理Java源代码的质 量。通过插件机制,Sonar 可以集成不同的测试工具,代码分析工具,以及持续集成工具,比如pmd-cpd、checkstyle、 findbugs、Jenkins。通过不同的插件对这些结果进行再加工处理,通过量化的方式度量代码质量的变化,从而可以方便地对不同规模和种类的工程 进行代码质量管理。 同时 Sonar 还对大量的持续集成工具提供了接口支持,可以很方便地在持续集成中使用 Sonar。 此外,Sonar 的插件还可以对 Java 以外的其他编程语言提供支持,对国际化以及报告文档化也有良好的支持。 2、配置数据库 Apache Derby 是Sonar自带并且默认安装使用的数据库,此外Sonar对如下数据库提供支持:MySQL 5.x, Oracle 10g XE, Postgresql, MS SqlServer等,本文以mysql为例介绍如何配置数据库: 1)创建数据库 在mysql中执行如下脚本创建数据库及mysql用户 CREATE DATABASE sonarCHARACTER

How can I recover my Git repository for a “missing tree” error?

拜拜、爱过 提交于 2019-11-27 00:54:14
问题 We are using Gerrit for our Git repository. On a project that has been active for several months, we are suddenly unable to push any changes. When we execute git push we see the following error: error: unpack failed: error Missing tree 14d62f0ed4385e3f68f226ac133fa9932a9c65c9 Executing git fsck --full yields: dangling tree 2701c92fb6eab1826482f6bcc9598413e651a92a dangling blob c505b3b12cfacd1e26dec8dc559820a30fc20c27 dangling blob 8907f94b5b4ec881e1b86d50681795e368c167ff dangling blob

Why does Gerrit not include the change-id into merge commits?

不想你离开。 提交于 2019-11-26 19:25:12
问题 so the git hook only puts change Id into commits. Although merge commits can be pushed to review branch even Gerrit is configured to require Change-Id in the commit messages. And when a merge commit has been pushed all the subsequent commit will depends on the merge commit - since there is no change Id. So what is the purpose not to include change Id into merge commit? 回答1: The underlying problem in Git is that commit-msg hooks are not called for merge commits without conflicts. However, the

Why is git push gerrit HEAD:refs/for/master used instead of git push origin master

我的未来我决定 提交于 2019-11-26 04:57:38
问题 I\'ve just started using gerrit and I want to know why we need to do git push gerrit HEAD:refs/for/master instead of doing git push origin master If I do git push origin master I get the error saying ! [remote rejected] master -> master (prohibited by Gerrit) 回答1: The documentation for Gerrit, in particular the "Push changes" section, explains that you push to the "magical refs/for/'branch' ref using any Git client tool". The following image is taken from the Intro to Gerrit. When you push to