• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • svnmerge-plugin
    • None

      Hi,

      Perhaps this is already available, but I just can't find it!

      Is there a way to trigger a manual reintegration of a branch job to its parent?

      I understand that there's the post-build action that can be added to do this automatically after each build of the branch, but I'd prefer to only reintegrate once we've decided to do so.

      I tried reintegrating the branch as normal via my SVN client, thinking that perhaps the plugin would magically pick that up, but no joy.

          [JENKINS-23371] Manually-triggered integration

          Chris Platts added a comment -

          Reopening because the option to reintegrate isn't showing on a project and can't tell why

          Chris Platts added a comment - Reopening because the option to reintegrate isn't showing on a project and can't tell why

          Hugues Chabot added a comment -

          The Integrate Branch action will be available if (and only if) the build if from a Feature Branch project that has only one Subversion module.

          Can you check if the builds that are not re-integrable have more than one Subversion URLs?

          Hugues Chabot added a comment - The Integrate Branch action will be available if (and only if) the build if from a Feature Branch project that has only one Subversion module. Can you check if the builds that are not re-integrable have more than one Subversion URLs?

          Chris Platts added a comment -

          Thanks for the reply,

          Both the parent and the branch projects have only one SVN module defined, however they do both use SVN Externals to pull in other libraries from our SVN repository. These externals are not modified in the projects into which they're pulled, so they should be clean (for us, modifying an external from anywhere other than a separate check-out of the external itself is a smack-able offence )

          Chris Platts added a comment - Thanks for the reply, Both the parent and the branch projects have only one SVN module defined, however they do both use SVN Externals to pull in other libraries from our SVN repository. These externals are not modified in the projects into which they're pulled, so they should be clean (for us, modifying an external from anywhere other than a separate check-out of the external itself is a smack-able offence )

          Hugues Chabot added a comment -

          It makes sense to ignore the content of external SVN repositories for rebase/integrate action.

          Hugues Chabot added a comment - It makes sense to ignore the content of external SVN repositories for rebase/integrate action.

          Code changed in jenkins
          User: Hugues Chabot
          Path:
          src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
          http://jenkins-ci.org/commit/svnmerge-plugin/990dc84985b54b93eb19b1e62048e1c1f3f04402
          Log:
          Merge pull request #14 from hugueschabot/jenkins-23371

          [FIXED JENKINS-23371] Ignore svn:externals when reintegrating branch

          Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/5880b5ac0018...990dc84985b5

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hugues Chabot Path: src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java http://jenkins-ci.org/commit/svnmerge-plugin/990dc84985b54b93eb19b1e62048e1c1f3f04402 Log: Merge pull request #14 from hugueschabot/jenkins-23371 [FIXED JENKINS-23371] Ignore svn:externals when reintegrating branch Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/5880b5ac0018...990dc84985b5

          Jackey Cheung added a comment - - edited

          I still can't see the Integrate Branch action. The following are from `svn info`:

          dev1:
          Path: .
          Working Copy Root Path: /var/lib/jenkins/jobs/xxxx-dev1/workspace
          URL: https://192.168.3.15/svn/xxxx/branches/dev1
          Repository Root: https://192.168.3.15/svn/xxxx
          Repository UUID: d0eb5361-05ce-7c4b-8453-cbb3c9b96fe4
          Revision: 131
          Node Kind: directory
          Schedule: normal

          trunk:
          Path: .
          Working Copy Root Path: /var/lib/jenkins/jobs/xxxx/workspace
          URL: https://192.168.3.15/svn/xxxx/trunk
          Repository Root: https://192.168.3.15/svn/xxxx
          Repository UUID: d0eb5361-05ce-7c4b-8453-cbb3c9b96fe4
          Revision: 129
          Node Kind: directory
          Schedule: normal

          What I've done was create a Jenkins job for the trunk. Then create a the dev1
          branch in Feature Branches. Then make a change to the README.md, perform a build,
          all on dev1. Then go to last build. Yet can't see the Integrate Branch action.

          ----------------
          A follow up update
          Not sure if it's related, I tried adding the Integrate to upstream upon successful build post-build action,
          and got an exception at the end of a (successful) build:

          ERROR: Publisher jenkins.plugins.svnmerge.IntegrationPublisher aborted due to exception
          java.lang.NullPointerException
          at jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:183)
          at jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:172)
          at jenkins.plugins.svnmerge.IntegrationPublisher.perform(IntegrationPublisher.java:51)
          at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
          at hudson.model.Run.execute(Run.java:1784)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:89)
          at hudson.model.Executor.run(Executor.java:240)

          Jackey Cheung added a comment - - edited I still can't see the Integrate Branch action. The following are from `svn info`: dev1: Path: . Working Copy Root Path: /var/lib/jenkins/jobs/xxxx-dev1/workspace URL: https://192.168.3.15/svn/xxxx/branches/dev1 Repository Root: https://192.168.3.15/svn/xxxx Repository UUID: d0eb5361-05ce-7c4b-8453-cbb3c9b96fe4 Revision: 131 Node Kind: directory Schedule: normal trunk: Path: . Working Copy Root Path: /var/lib/jenkins/jobs/xxxx/workspace URL: https://192.168.3.15/svn/xxxx/trunk Repository Root: https://192.168.3.15/svn/xxxx Repository UUID: d0eb5361-05ce-7c4b-8453-cbb3c9b96fe4 Revision: 129 Node Kind: directory Schedule: normal What I've done was create a Jenkins job for the trunk. Then create a the dev1 branch in Feature Branches. Then make a change to the README.md, perform a build, all on dev1. Then go to last build. Yet can't see the Integrate Branch action. ---------------- A follow up update Not sure if it's related, I tried adding the Integrate to upstream upon successful build post-build action, and got an exception at the end of a (successful) build: ERROR: Publisher jenkins.plugins.svnmerge.IntegrationPublisher aborted due to exception java.lang.NullPointerException at jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:183) at jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:172) at jenkins.plugins.svnmerge.IntegrationPublisher.perform(IntegrationPublisher.java:51) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) at hudson.model.Run.execute(Run.java:1784) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)

          Hugues Chabot added a comment -

          Please verify the configuration of the "Feature Branch" job.

          • "This project builds a Subversion feature branch" must be checked.
            • "Upstream project name" must be the name of the job that build the trunk.

          Hugues Chabot added a comment - Please verify the configuration of the "Feature Branch" job. "This project builds a Subversion feature branch" must be checked. "Upstream project name" must be the name of the job that build the trunk.

          Jackey Cheung added a comment -

          I've double checked the Upstream project name is correct. Also, the branch job is created with "Feature Branch", isn't it supposed to be correct?

          In the "Configure" of branch job:
          "This project builds a Subversion feature branch" is checked;
          "Upstream project name" is "xxxx".

          In the Status page of branch job:
          "Subversion Merge Tracking
          This project is a feature branch of xxxx"

          Clicking the job link goes to the master job "xxxx", as expected.

          In the "Configure" of master job:
          "Accept Integration from Subversion feature branches" is checked.

          In the "Feature Branches" of master job:
          "Existing Feature Branches
          xxxx-dev1"

          Clicking the job name goes to the branch job, as expected.

          Jackey Cheung added a comment - I've double checked the Upstream project name is correct. Also, the branch job is created with "Feature Branch", isn't it supposed to be correct? In the "Configure" of branch job: "This project builds a Subversion feature branch" is checked; "Upstream project name" is "xxxx". In the Status page of branch job: "Subversion Merge Tracking This project is a feature branch of xxxx" Clicking the job link goes to the master job "xxxx", as expected. In the "Configure" of master job: "Accept Integration from Subversion feature branches" is checked. In the "Feature Branches" of master job: "Existing Feature Branches xxxx-dev1" Clicking the job name goes to the branch job, as expected.

          Hugues Chabot added a comment -

          eidng8 you are right. Job created as "Feature Branch" should be correct but the NullPointerException you observed could be caused by an invalid job configuration.

          The other explanation is that the project contains multiple Subversion sources (if it contains svn:externals for instance). This can be confirmed by looking at the build page (under Revisions). I know this kind of project is not fully supported but it think it should be. Please open a new issue if it is your case.

          Hugues Chabot added a comment - eidng8 you are right. Job created as "Feature Branch" should be correct but the NullPointerException you observed could be caused by an invalid job configuration. The other explanation is that the project contains multiple Subversion sources (if it contains svn:externals for instance). This can be confirmed by looking at the build page (under Revisions). I know this kind of project is not fully supported but it think it should be. Please open a new issue if it is your case.

          Jackey Cheung added a comment -

          The svn repo is a fresh one, just for trying out the Jenkins. There is no other sources in it.

          I've double checked with:
          svn propget svn:externals
          Which returns empty.

          Jackey Cheung added a comment - The svn repo is a fresh one, just for trying out the Jenkins. There is no other sources in it. I've double checked with: svn propget svn:externals Which returns empty.

            hugueschabot Hugues Chabot
            displaced Chris Platts
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: