Continuum
  1. Continuum
  2. CONTINUUM-2043

Release should happen on a build agent rather than on the master

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1 (Alpha)
    • Fix Version/s: 1.3.2 (Beta)
    • Component/s: Distributed Builds
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      When the distributed builds feature is enabled, releases should happen on a build agent instead of the master.

      Will need to reverse the change made for CONTINUUM-2035 which checks out code on the master.

      Related to CONTINUUM-2042, Ability to control which build agent a project builds on.

        Issue Links

          Activity

          Hide
          Wendy Smoak added a comment -

          Thanks, Marica. I had a couple of questions about this one:

          > 2. Release will happen in the build agent where the last build of the project was performed.

          What happens if that build agent is busy building some other project when you click 'Release'?

          What happens if that build agent has been disabled or has been deleted from the system?

          Show
          Wendy Smoak added a comment - Thanks, Marica. I had a couple of questions about this one: > 2. Release will happen in the build agent where the last build of the project was performed. What happens if that build agent is busy building some other project when you click 'Release'? What happens if that build agent has been disabled or has been deleted from the system?
          Hide
          Maria Catherine Tan added a comment -

          > What happens if that build agent is busy building some other project when you click 'Release'?
          It will still continue with the release.

          > What happens if that build agent has been disabled or has been deleted from the System?
          You won't be able to release unless you try to build again in another agent then release. The reason for this is, if I only have a working copy in agent 1 and it has been deleted from the System, even if i try to release from another agent i still won't be able to release from that agent because there is no working copy.

          At least that's how I understand the way continuum does its release.

          Show
          Maria Catherine Tan added a comment - > What happens if that build agent is busy building some other project when you click 'Release'? It will still continue with the release. > What happens if that build agent has been disabled or has been deleted from the System? You won't be able to release unless you try to build again in another agent then release. The reason for this is, if I only have a working copy in agent 1 and it has been deleted from the System, even if i try to release from another agent i still won't be able to release from that agent because there is no working copy. At least that's how I understand the way continuum does its release.
          Hide
          Wendy Smoak added a comment -

          Thanks for the explanation. Yes it makes sense that you have to have a successful build prior to a release (though the UI could do a better job at telling you what's going on. Right now it just refuses to do the release and doesn't give you any message.)

          When I tested releasing on a build agent, It failed at the scm-commit-release phase with the following output:
          [ERROR] org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files
          Provider message:
          The svn command failed.
          Command output:
          svn: '/Users/wsmoak/svn/continuum/continuum/continuum-buildagent/continuum-buildagent-webapp/working-directory/6/working-directory/6' is not a working copy
          svn: Can't open file '/Users/wsmoak/svn/continuum/continuum/continuum-buildagent/continuum-buildagent-webapp/working-directory/6/working-directory/6/.svn/entries': No such file or directory

          at org.apache.maven.shared.release.phase.ScmCommitPhase.checkin(ScmCommitPhase.java:133)
          at org.apache.maven.shared.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:109)
          at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:194)
          at org.apache.maven.shared.release.DefaultReleaseManager.prepareWithResult(DefaultReleaseManager.java:107)
          at org.apache.maven.continuum.release.executors.PrepareReleaseTaskExecutor.execute(PrepareReleaseTaskExecutor.java:44)
          at org.apache.maven.continuum.release.executors.AbstractReleaseTaskExecutor.executeTask(AbstractReleaseTaskExecutor.java:68)
          at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
          at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
          at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
          at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
          at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
          at java.lang.Thread.run(Thread.java:637)

          Note that 'working-directory/6' is duplicated in the path it's trying to use.

          My configuration on the build agent is simply
          <buildOutputDirectory>build-output-directory</buildOutputDirectory>
          (not a full path).

          Show
          Wendy Smoak added a comment - Thanks for the explanation. Yes it makes sense that you have to have a successful build prior to a release (though the UI could do a better job at telling you what's going on. Right now it just refuses to do the release and doesn't give you any message.) When I tested releasing on a build agent, It failed at the scm-commit-release phase with the following output: [ERROR] org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files Provider message: The svn command failed. Command output: svn: '/Users/wsmoak/svn/continuum/continuum/continuum-buildagent/continuum-buildagent-webapp/working-directory/6/working-directory/6' is not a working copy svn: Can't open file '/Users/wsmoak/svn/continuum/continuum/continuum-buildagent/continuum-buildagent-webapp/working-directory/6/working-directory/6/.svn/entries': No such file or directory at org.apache.maven.shared.release.phase.ScmCommitPhase.checkin(ScmCommitPhase.java:133) at org.apache.maven.shared.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:109) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:194) at org.apache.maven.shared.release.DefaultReleaseManager.prepareWithResult(DefaultReleaseManager.java:107) at org.apache.maven.continuum.release.executors.PrepareReleaseTaskExecutor.execute(PrepareReleaseTaskExecutor.java:44) at org.apache.maven.continuum.release.executors.AbstractReleaseTaskExecutor.executeTask(AbstractReleaseTaskExecutor.java:68) at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116) at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528) at java.lang.Thread.run(Thread.java:637) Note that 'working-directory/6' is duplicated in the path it's trying to use. My configuration on the build agent is simply <buildOutputDirectory>build-output-directory</buildOutputDirectory> (not a full path).
          Hide
          Maria Catherine Tan added a comment -

          Fixed in revision 755049 by returning the canonical form of the working directory.

          Thanks Wendy!

          Show
          Maria Catherine Tan added a comment - Fixed in revision 755049 by returning the canonical form of the working directory. Thanks Wendy!
          Hide
          Wendy Smoak added a comment -

          There is a problem with the UI for this. It lets you select a Build Environment (and so, a Build Agent Group,) when you prepare the release, but then it builds on whatever agent was used last, ignoring at least that part of the Build Environment. I am not sure whether it uses the rest of the Build Env configuration or if it just uses the values it used during the last release. I opened CONTINUUM-2386 to track this.

          Show
          Wendy Smoak added a comment - There is a problem with the UI for this. It lets you select a Build Environment (and so, a Build Agent Group,) when you prepare the release, but then it builds on whatever agent was used last, ignoring at least that part of the Build Environment. I am not sure whether it uses the rest of the Build Env configuration or if it just uses the values it used during the last release. I opened CONTINUUM-2386 to track this.

            People

            • Assignee:
              Maria Catherine Tan
              Reporter:
              Wendy Smoak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: