gerrit-trigger

Jenkins - how to show downstream jobs build result on Gerrit patch set?

微笑、不失礼 提交于 2021-01-27 19:32:23
问题 below is my use case, I have jobs A, B, C - A is upstream and B and C are downstream jobs. When a Patch set created in Gerrit, based on the patchset created event I trigger Job A and based on the result of this job, we trigger B and C. After the B and C is executed, I want to display the result of all three jobs on Gerrit patch set. like Job A SUCCESS JOB B SUCCESS JOB C FAILED right now I see only JOB A Build result showing up on GERRIT PATCH SET as JOB A SUCCESS is there any way to do this?

how to add gerrit-trigger events inside Jenkins pipeline code, inside Jenkinsfile

此生再无相见时 提交于 2020-01-04 05:45:07
问题 I would like to add gerrit trigger events inside Jenkinsfile, like we have in JobDSL, triggers { upstream('pipeline_properties', 'UNSTABLE') gerrit { events { refUpdated() } project('reg_exp:jenkins', ["plain:${jenkins_branch}"]) } } Is this something possible in pipeline code, could able to find some things like cron and stuffs under triggers but not able to get a reference how to add the gerrit-trigger event inside. 回答1: Here is one working Jenkinsfile covers the gerrit trigger event part,

Gerrit trigger for Jenkins couldn't find any revision to build

孤人 提交于 2019-12-21 07:37:00
问题 I have trouble using Jenkins+Gerrit. Here is what I got so far: Gerrit Trigger configuration in Jenkins seems to be ok: When I push a new changeset, Jenkins build is launched. I used this: Jenkins: settings for Gerrit Trigger problems to also be able to launch it "manually". As for my configuration, I have something like this: https://stackoverflow.com/a/18347982/2248987. Branch Specifier is $GERRIT_BRANCH and Ref Spec is $GERRIT_REFSPEC Gerrit and Git are working fines on their own. Access

Sonar Gerrit plugin not reporting results

和自甴很熟 提交于 2019-12-19 12:05:53
问题 We utilize the pipeline and after the build completes successfully we are running the following: bat "mvn sonar:sonar -B -s ${buildSettings} -Dsonar.analysis.mode=preview -Dsonar.skipDesign=true -Dsonar.report.export.path=sonar-report.json" sonarToGerrit(severity: 'Major', postScore: true, category: 'Code-Review', newIssuesOnly: true, issuesScore: '0', noIssuesScore: '0', changedLinesOnly: true) The below build log shows that it found a good number of issues but yet the issues to be commented

Sonar Gerrit plugin not reporting results

ⅰ亾dé卋堺 提交于 2019-12-19 12:05:29
问题 We utilize the pipeline and after the build completes successfully we are running the following: bat "mvn sonar:sonar -B -s ${buildSettings} -Dsonar.analysis.mode=preview -Dsonar.skipDesign=true -Dsonar.report.export.path=sonar-report.json" sonarToGerrit(severity: 'Major', postScore: true, category: 'Code-Review', newIssuesOnly: true, issuesScore: '0', noIssuesScore: '0', changedLinesOnly: true) The below build log shows that it found a good number of issues but yet the issues to be commented

How to configure server side hooks in Gerrit 2.16

大兔子大兔子 提交于 2019-12-11 03:14:23
问题 I have started using Gerrit 2.16 as code review tool and want to configure server side hooks to validate the git commit message when a change is committed/pushed to gerrit. Tried using hooks by copying scripts to $GIT_DIR/hooks (scripts like ref-update, patchset-created, change-merged), gave permission on the gerrit server but nothing works. commit-msg hook can be enabled on local repository by using command give in gerrit UI example: git clone ssh://@:29418/Project1 && scp -p -P 29418 @

Gerrit trigger for Jenkins couldn't find any revision to build

狂风中的少年 提交于 2019-12-03 23:43:16
I have trouble using Jenkins+Gerrit. Here is what I got so far: Gerrit Trigger configuration in Jenkins seems to be ok: When I push a new changeset, Jenkins build is launched. I used this: Jenkins: settings for Gerrit Trigger problems to also be able to launch it "manually". As for my configuration, I have something like this: https://stackoverflow.com/a/18347982/2248987 . Branch Specifier is $GERRIT_BRANCH and Ref Spec is $GERRIT_REFSPEC Gerrit and Git are working fines on their own. Access seems OK too. Here is my issue. When building (gerrit triggered or manually), log output is: > git rev

Sonar Gerrit plugin not reporting results

☆樱花仙子☆ 提交于 2019-12-01 14:01:33
We utilize the pipeline and after the build completes successfully we are running the following: bat "mvn sonar:sonar -B -s ${buildSettings} -Dsonar.analysis.mode=preview -Dsonar.skipDesign=true -Dsonar.report.export.path=sonar-report.json" sonarToGerrit(severity: 'Major', postScore: true, category: 'Code-Review', newIssuesOnly: true, issuesScore: '0', noIssuesScore: '0', changedLinesOnly: true) The below build log shows that it found a good number of issues but yet the issues to be commented is 0. Build log Other posts suggest that it may not be finding the report but I don't believe it's the

Jenkins Failed to connect to gerrit repository (Windows installation)

回眸只為那壹抹淺笑 提交于 2019-12-01 08:10:09
I looked around Stackoverflow and google a lot but I am not able to solve my issue. My aim : I want to set up Jenkins to use git SCM to clone a repository host by gerrit My Jenkins config Jenkins version 2.7.1 running on windows as a service Git plugin version 2.5.3 Multiple SCM plugin version 0.6 Gerrit Trigger plugin version 2.21.1 The issue The URL is configured as IHM@IP:/path/to/gerrit/git/IHM.git . IHM is the user which launched Jenkins on a windows server. IP is the adress of the red hat server hosting gerrit. Credentials are set to use user IHM with the ssh key enter directly. The key

Jenkins Failed to connect to gerrit repository (Windows installation)

蓝咒 提交于 2019-12-01 06:29:19
问题 I looked around Stackoverflow and google a lot but I am not able to solve my issue. My aim : I want to set up Jenkins to use git SCM to clone a repository host by gerrit My Jenkins config Jenkins version 2.7.1 running on windows as a service Git plugin version 2.5.3 Multiple SCM plugin version 0.6 Gerrit Trigger plugin version 2.21.1 The issue The URL is configured as IHM@IP:/path/to/gerrit/git/IHM.git . IHM is the user which launched Jenkins on a windows server. IP is the adress of the red