Praqma / pretested-integration-plugin

A generic pretest commit plugin for Jenkins CI
MIT License
7 stars 14 forks source link

Seeing NothingToDoException exception #117

Closed ashishujjain closed 6 years ago

ashishujjain commented 6 years ago

Pugin version 2.4.1 on Jenkins version 2.103 Git Plugin version is 3.7.0 Git Client Plugin version is 2.7.0

How to get pass the below issue, with the plugin usage.

Jan 24, 2018 5:26:14 PM SEVERE org.jenkinsci.plugins.pretestedintegration.PretestedIntegrationBuildWrapper setUp [PREINT] [PREINT] - setUp() - NothingToDoException - Nothing to do. The reason is: No revision matches configuration in 'Integration repository' 92c0fa2d89ca48a7f2d128c37dbde54e8ea257e3 refs/remotes/origin/develop

org.jenkinsci.plugins.pretestedintegration.exceptions.NothingToDoException: Nothing to do. The reason is: No revision matches configuration in 'Integration repository' 92c0fa2d89ca48a7f2d128c37dbde54e8ea257e3 refs/remotes/origin/develop

at org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge.findRelevantBuildData(GitBridge.java:235)
at org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge.isApplicable(GitBridge.java:304)
at org.jenkinsci.plugins.pretestedintegration.PretestedIntegrationBuildWrapper.setUp(PretestedIntegrationBuildWrapper.java:67)
at hudson.model.Build$BuildExecution.doRun(Build.java:157)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1727)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)

screen shot 2018-01-24 at 6 36 26 pm screen shot 2018-01-24 at 6 36 48 pm screen shot 2018-01-24 at 6 37 00 pm

buep commented 6 years ago

It seems like there is no revision as the plugin tells you, meaning the job is triggered by the Git plugin with a branch the pretested integration job can't find.

It could be you try to rebuild the job with a branch already integrated?

Also I would not recommend that you use the git publisher with the pretested integration plugin, you should use the Pretested Integration Publisher post-build step only.

ashishujjain commented 6 years ago

Upgrade the Pretested Integration Plugin v3.0.0 (9fd14). Git Plugin version is 3.7.0 Git Client Plugin version is 2.7.1

Still seeing the exception as below, please point me, what I am doing wrong here?

Do I need to downgrade the git plugin version to a specific version as below? Jenkins Git client plugin v.1.19.1 (required) Jenkins Git plugin v.2.4.1 (required)

Jan 31, 2018 4:01:39 PM SEVERE org.jenkinsci.plugins.pretestedintegration.scm.git.PretestedIntegrationAsGitPluginExt decorateRevisionToBuild [PREINT] [PREINT] - setUp() - NothingToDoException - Nothing to do. The reason is: No revision matches configuration in 'Integration repository' org.jenkinsci.plugins.pretestedintegration.exceptions.NothingToDoException: Nothing to do. The reason is: No revision matches configuration in 'Integration repository' at org.jenkinsci.plugins.pretestedintegration.scm.git.SquashCommitStrategy.integrateAsGitPluginExt(SquashCommitStrategy.java:209) at org.jenkinsci.plugins.pretestedintegration.scm.git.PretestedIntegrationAsGitPluginExt.decorateRevisionToBuild(PretestedIntegrationAsGitPluginExt.java:124) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1068) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1161) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1203) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1727) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)

Below is the job configuration:

screen shot 2018-01-31 at 4 14 32 pm screen shot 2018-01-31 at 4 14 47 pm screen shot 2018-01-31 at 4 14 56 pm

Jenkins console output:

[WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Done Wiping out workspace first. Cloning the remote Git repository Avoid fetching tags Cloning repository https://bitbucket.org/ColorTokens/ng-colormaster.git

git init /var/lib/jenkins/workspace/merge-k2-to-norma # timeout=10 Fetching upstream changes from https://bitbucket.org/ColorTokens/ng-colormaster.git git --version # timeout=10 using GIT_ASKPASS to set credentials For HTTPS Download of Source Code git fetch --no-tags --progress https://bitbucket.org/ColorTokens/ng-colormaster.git +refs/heads/:refs/remotes/origin/ git config remote.origin.url https://bitbucket.org/ColorTokens/ng-colormaster.git # timeout=10 git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10 git config remote.origin.url https://bitbucket.org/ColorTokens/ng-colormaster.git # timeout=10 Pruning obsolete local branches Cleaning workspace git rev-parse --verify HEAD # timeout=10 No valid HEAD. Skipping the resetting git clean -fdx # timeout=10 Fetching upstream changes from https://bitbucket.org/ColorTokens/ng-colormaster.git using GIT_ASKPASS to set credentials For HTTPS Download of Source Code git fetch --no-tags --progress https://bitbucket.org/ColorTokens/ng-colormaster.git +refs/heads/:refs/remotes/origin/ --prune git rev-parse refs/remotes/origin/develop^{commit} # timeout=10 git rev-parse refs/remotes/origin/origin/develop^{commit} # timeout=10 [PREINT] Pretested Integration Plugin v3.0.0 (9fd14) [PREINT] Checking out integration branch merge-testing-ashish: git config core.sparsecheckout # timeout=10 git checkout -f origin/merge-testing-ashish git branch -a -v --no-abbrev # timeout=10 git checkout -b merge-testing-ashish origin/merge-testing-ashish [PREINT] [PREINT] - setUp() - NothingToDoException - Nothing to do. The reason is: No revision matches configuration in 'Integration repository' git config core.sparsecheckout # timeout=10 git checkout -f origin/merge-testing-ashish git branch -a -v --no-abbrev # timeout=10 git branch -D merge-testing-ashish # timeout=10 git checkout -b merge-testing-ashish origin/merge-testing-ashish git config core.sparsecheckout # timeout=10 git checkout -f refs/remotes/origin/develop Checking out Revision 58fc0930b613344f361896e6975cdbdb02083318 (refs/remotes/origin/develop) git config core.sparsecheckout # timeout=10 git checkout -f 58fc0930b613344f361896e6975cdbdb02083318 Commit message: "Merged in alignment-and-css-fixes (pull request #1439)" git rev-list --no-walk 58fc0930b613344f361896e6975cdbdb02083318 # timeout=10 [merge-k2-to-norma] $ /bin/sh -xe /tmp/jenkins2094124693721915311.sh

  • echo

[BFA] Scanning build for known causes... [BFA] No failure causes found [BFA] Done. 0s Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Finished: NOT_BUILT

ashishujjain commented 6 years ago

I was able to find the right configuration as per details in the bug https://issues.jenkins-ci.org/browse/JENKINS-25831?focusedCommentId=217164&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-217164

with the below configuration plugin worked for me.

screen shot 2018-01-31 at 6 00 52 pm screen shot 2018-01-31 at 6 07 50 pm

buep commented 6 years ago

great