wolfeidau / rake-bamboo-plugin

Plugin for bamboo which enables building of ruby projects using rake
Other
34 stars 16 forks source link

Bamboo 5 beta 2 crash when running Bundler #38

Closed shimms closed 11 years ago

shimms commented 11 years ago

Just built the plugin from source (1.16-SNAPSHOT) and tried it out on Bamboo 5 Beta 2. (I updated the babmoo.version in the pom to 5.0-beta2).

When running the bundler task the following error occurs:

java.lang.IncompatibleClassChangeError: Found interface com.atlassian.utils.process.ExternalProcess, but class was expected

The full log of the plan execution is below:


29-May-2013 16:05:54    Build Project - Plan - Default Job #6 (PROJECT-PLAN-JOB1-6) started building on agent Default Agent
29-May-2013 16:05:54    Build working directory is /etc/bamboo/xml-data/build-dir/PROJECT-PLAN-JOB1
29-May-2013 16:05:54    Executing build Project - Plan - Default Job #6 (PROJECT-PLAN-JOB1-6)
29-May-2013 16:05:54    Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'
29-May-2013 16:05:54    Build always requires a clean checkout
29-May-2013 16:05:54    Cleaning build directory '/etc/bamboo/xml-data/build-dir/PROJECT-PLAN-JOB1'
29-May-2013 16:05:54    Updating source code to revision: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
29-May-2013 16:05:54    Fetching 'refs/heads/develop' from 'git@bitbucket.org:organization/repository.git'.
29-May-2013 16:05:55    Warning: Permanently added '[127.0.0.1]:53321' (RSA) to the list of known hosts.
29-May-2013 16:05:58    fatal: The remote end hung up unexpectedly
29-May-2013 16:05:58    Checking out revision xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
29-May-2013 16:05:58    Creating local git repository in '/etc/bamboo/xml-data/build-dir/PROJECT-PLAN-JOB1/.git'.
29-May-2013 16:05:58    Initialized empty Git repository in /etc/bamboo/xml-data/build-dir/PROJECT-PLAN-JOB1/.git/
29-May-2013 16:05:59    Switched to branch 'develop'
29-May-2013 16:05:59    Updated source code to revision: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
29-May-2013 16:05:59    Finished task 'Checkout Default Repository'
29-May-2013 16:05:59    Running pre-build action: Clover Grails PreBuild Action
29-May-2013 16:05:59    Running pre-build action: VCS Version Collector
29-May-2013 16:05:59    Starting task 'Bundler' of type 'au.id.wolfe.bamboo.rake-bamboo-plugin:task.builder.bundler'
29-May-2013 16:05:59    Error occurred while running Task '(2)' of type au.id.wolfe.bamboo.rake-bamboo-plugin:task.builder.bundler.
29-May-2013 16:05:59    java.lang.IncompatibleClassChangeError: Found interface com.atlassian.utils.process.ExternalProcess, but class was expected
29-May-2013 16:05:59            at au.id.wolfe.bamboo.ruby.tasks.AbstractRubyTask.execute(AbstractRubyTask.java:66)
29-May-2013 16:05:59            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:208)
29-May-2013 16:05:59            at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98)
29-May-2013 16:05:59            at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)
29-May-2013 16:05:59            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:186)
29-May-2013 16:05:59            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102)
29-May-2013 16:05:59            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:105)
29-May-2013 16:05:59            at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
29-May-2013 16:05:59            at java.lang.Thread.run(Thread.java:722)
29-May-2013 16:05:59    Running post build plugin 'NCover Results Collector'
29-May-2013 16:05:59    Running post build plugin 'Clover Results Collector'
29-May-2013 16:05:59    Running post build plugin 'Artifact Copier'
29-May-2013 16:05:59    Finalising the build...
29-May-2013 16:05:59    Stopping timer.
29-May-2013 16:05:59    Build PROJECT-PLAN-JOB1-6 completed.
29-May-2013 16:05:59    Running on server: post build plugin 'NCover Results Collector'
29-May-2013 16:05:59    Running on server: post build plugin 'Clover Delta Calculator'
29-May-2013 16:06:00    Running on server: post build plugin 'Build Hanging Detection Configuration'
29-May-2013 16:06:00    Running on server: post build plugin 'Maven Dependencies Postprocessor'
29-May-2013 16:06:00    All post build plugins have finished
29-May-2013 16:06:00    Generating build results summary...
29-May-2013 16:06:00    Saving build results to disk...
29-May-2013 16:06:00    Indexing build results...
29-May-2013 16:06:00    Finished building PROJECT-PLAN-JOB1-6.

The bamboo.log for this run contains the follow:

2013-05-29 16:05:59,183 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [VcsCheckoutTask] PROJECT-PLAN-JOB1-6: Updated source code to revision: 3b39d4c732459ed4583f92620670bac038577f5e
2013-05-29 16:05:59,217 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [PrepareBuildTask] PROJECT-PLAN-JOB1-6: Running pre-build action: Clover Grails PreBuild Action
2013-05-29 16:05:59,269 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [PrepareBuildTask] PROJECT-PLAN-JOB1-6: Running pre-build action: VCS Version Collector
2013-05-29 16:05:59,274 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [DefaultBuildAgent] Running build phase: com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask
2013-05-29 16:05:59,305 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [ExecutionPhaseServiceImpl] Project - Plan - Default Job #6 (PROJECT-PLAN-JOB1-6) execution started
2013-05-29 16:05:59,306 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [ChainExecutionManagerImpl] onExecutionStartedTimingPoint for PROJECT-PLAN-JOB1-6
2013-05-29 16:05:59,311 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [DefaultBuildExecutionManager] onExecutionStartedTimingPoint for PROJECT-PLAN-JOB1-6
2013-05-29 16:05:59,330 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [TaskExecutorImpl] PROJECT-PLAN-JOB1-6: Starting task 'Bundler' of type 'au.id.wolfe.bamboo.rake-bamboo-plugin:task.builder.bundler'
2013-05-29 16:05:59,331 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [AbstractRubyTask] Using manager RVM runtime ruby-2.0.0-p0@gemsetname
2013-05-29 16:05:59,444 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [RubyLocatorServiceFactory] Loaded ruby runtime managers [au.id.wolfe.bamboo.ruby.system.SystemRubyRuntimeLocatorService@30f8a7de, au.id.wolfe.bamboo.ruby.rbenv.RbenvRubyRuntimeLocatorService@14d4f8f0, au.id.wolfe.bamboo.ruby.rvm.RvmRubyRuntimeLocatorService@2a235f3f, au.id.wolfe.bamboo.ruby.windows.WindowsRubyRuntimeLocatorService@784236b5] 
2013-05-29 16:05:59,445 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [RvmRubyRuntimeLocatorService] Searching for rvm installation in users home directory located at - /home/atlassian/.rvm
2013-05-29 16:05:59,454 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [RvmRubyRuntimeLocatorService] Searching for rvm installation in users home directory located at - /home/atlassian/.rvm
2013-05-29 16:05:59,512 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [RvmRubyRuntimeLocatorService] Searching for rvm installation in users home directory located at - /home/atlassian/.rvm
2013-05-29 16:05:59,512 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [RvmRubyRuntimeLocatorService] Searching for rvm installation in users home directory located at - /home/atlassian/.rvm
2013-05-29 16:05:59,525 INFO [7-BAM::Default Agent::Agent:pool-16-thread-1] [DefaultErrorHandler] Recording an error: Error occurred while running Task '(2)' of type au.id.wolfe.bamboo.rake-bamboo-plugin:task.builder.bundler. : PROJECT-PLAN-JOB1 : Found interface com.atlassian.utils.process.ExternalProcess, but class was expected
2013-05-29 16:05:59,535 ERROR [7-BAM::Default Agent::Agent:pool-16-thread-1] [TaskExecutorImpl] Error occurred while running Task '(2)' of type au.id.wolfe.bamboo.rake-bamboo-plugin:task.builder.bundler.
java.lang.IncompatibleClassChangeError: Found interface com.atlassian.utils.process.ExternalProcess, but class was expected
    at au.id.wolfe.bamboo.ruby.tasks.AbstractRubyTask.execute(AbstractRubyTask.java:66)
    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:208)
    at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98)
    at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)
    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:186)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102)
    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:105)
    at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)
    at java.lang.Thread.run(Thread.java:722)
wolfeidau commented 11 years ago

Just running the tests now, I have updated to 5.0-beta2 as well.

Will get back to you once it has downloaded everything and i have done some builds.

shimms commented 11 years ago

Cool - would love to submit a PR for this, but I'm just not familiar enough with the Bamboo SDK (or Java really for that matter).

Might try and get more familiar with it so I can contribute back - love this plugin, without it Bamboo would be useless for us.

wolfeidau commented 11 years ago

I have tested this with my plugin using JUST the SDK.

atlas-mvn clean test && atlas-mvn bamboo:run

Note: The clean is very important as all sorts of shit is left in the target directory.

No errors and built and ran tests in my sample rails project hosted on bitbucket.

I am now going to pull down the beta and run it standalone.

shimms commented 11 years ago

Yep - cleaning solved this issue. My bad. Cleaned, packaged and deployed to bamboo, build is now running.

wolfeidau commented 11 years ago

All good mate, it is a lesson I learnt after much frustration myself.

After working through it myself a few times I knew it had to be something annoying like that, it seems my hunch was correct.

Thanks again for posting a very detailed issue report it helps a lot.

i386 commented 11 years ago

I see that you guys figured this one out - awesome.

Mark, I suspect the plugin built against 5.0 won't be compatible with 4.4 as there was a change to make ExternalProcess an interface rather than a class.