Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Promotion Help in QB 2.0 #656

mattinger ·
I'm a little stuck in trying to setup promotion in 2.0.

I'm basically just trying to copy the artifacts from one configuration to another without rebuilding anything.

I setup a Quickbuild repository with these settings:

Configuration: ${build.promotionSource.configuration.pathName}
Build Version: ${build.promotionSource.version}

I then setup the "release" configuration as a sibling of the "qa" configuration, with a master step which consists
of one substep which is a checkout from the Quickbuild repository. I want to define the repository and the step
at the root level, as this pattern will be used all over my configurations, so i don't want absolute paths, and i don't
want variables. I just want to promote to a sibling, and want the promotion target to checkout the artifacts from
the promotion source.

the problem is that when I click the promote button, and it tries to checkout, it's getting an MVEL evaluation error,
and I get this in the system log:

Caused by: com.pmease.quickbuild.QuickbuildException: Failed to evaluate below expression:
mvel:build.promotionSource.configuration.pathName
at com.pmease.quickbuild.util.ExceptionUtils.wrapException(ExceptionUtils.java:90)
at com.pmease.quickbuild.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:71)
at com.pmease.quickbuild.DefaultExpressionManager.interpolate(DefaultExpressionManager.java:84)
at com.pmease.quickbuild.DefaultExpressionManager$Interpolator.intercept(DefaultExpressionManager.java:259)
at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$272ef3cf.getConfigurationPath(<generated>)
at com.pmease.quickbuild.dependency.QuickbuildRepository.getConfigurationDOM(QuickbuildRepository.java:161)
at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$272ef3cf.CGLIB$getConfigurationDOM$23(<generated>)
at com.pmease.quickbuild.dependency.QuickbuildRepository$$EnhancerByCGLIB$$272ef3cf$$FastClassByCGLIB$$597e90f7.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)


This sort of approach was how it was done in 1.2.x. Am i missing something here? Is there some completely different approach for 2.0? I can't find much useful examples in the documentation in terms of how to setup the target configuration or how to use the scripting, other than to use "vars.get" in the configuration field of the repository.
  • replies 6
  • views 2428
  • stars 0
robinshen ADMIN ·
Promotion has been made easy in 2.0. You won't need to define a special QuickBuild repository just to retrieve promoted artifacts. For details please refer to:
http://wiki.pmease.com/display/qb2/Set+ ... +Promotion
mattinger ·
Robin,

I tried this, and when I did this, it fired off my "master" build step, which is what I didn't want to happen. Do i need to define a "Dummy" build step as the master in the "release" configuration?
robinshen ADMIN ·
Yes, you can define a dummy step as the master step if you do not want to do anything at release stage (I do think add a publish step to publish the delivered artifacts should be at least included in your release configuration).
mattinger ·
OK. I did this, and it's not copying any of my artifacts. I'm getting a build with nothing in it.

Here's my promotion settings:

Recommended Only: Yes
Configuration: ${configuration.parent}/release
Files To Promote:
Source Path Files To Promote Destination Path
artifacts **


And in the release configuration, I have a "master" step with only a dummy step inside of it. When
I click the "promote" button, i end up with a succesfull build with no artifacts in it. This is why I thought
I needed a checkout from the Quickbuild repository step. Here's the build log:

13:56:13,6 INFO - Checking execute condition of step 'master'...
13:56:13,6 INFO - Execute condition satisfied, selecting node to run step 'master'...
13:56:13,6 [master@build.devlab.com:8810] INFO - Running step 'master' on node 'build.devlab.com:8810'...
13:56:13,6 [master@build.devlab.com:8810] INFO - Acquiring workspace mutex...
13:56:13,6 [master@build.devlab.com:8810] INFO - Workspace mutex acquired.
13:56:54,4 [master@build.devlab.com:8810] INFO - Checking execute condition of step 'dummy'...
13:56:54,4 [master@build.devlab.com:8810] INFO - Execute condition satisfied, selecting node to run step 'dummy'...
13:56:54,5 [dummy@build.devlab.com:8810] INFO - Running step 'dummy' on node 'build.devlab.com:8810'...
13:56:54,5 [dummy@build.devlab.com:8810] INFO - Acquiring workspace mutex...
13:56:54,5 [dummy@build.devlab.com:8810] INFO - Workspace mutex acquired.
13:56:54,5 [dummy@build.devlab.com:8810] INFO - Nothing to do in dummy step.
13:56:54,5 [dummy@build.devlab.com:8810] INFO - Step 'dummy' is successful.
13:56:54,5 [dummy@build.devlab.com:8810] INFO - Workspace mutex released.
13:56:54,5 [master@build.devlab.com:8810] INFO - Step 'master' is successful.
13:56:54,5 [master@build.devlab.com:8810] INFO - Workspace mutex released.
13:56:54,6 WARN - Base build not exist to calculate change sets.
mattinger ·
Thanks, the publish step was what i was missing here. It would a great help if the documentation had a start to finish sample of a build promotion configuration on both the source and target. I know this setup has always been a source of confusion for users since it's inception, so dcoumentation is key in this respect.

That being said, the simplified setup is much appreciated once i realized what i needed.

Overall, I'm finding that my configurations are much simpler than 1.2.x, and am leaning towards a brand new installation rather than an upgrade. The differences are so large in the configuration setups that it just makes sense to have a new db and server, and just point the users to a new server when the time comes. Losing the existing builds is not a big deal to us, as we typically remove them over time as they are archived to tape to save space.

Thanks for all the hard work.
robinshen ADMIN ·
I am glad you feel easy with 2.0. This is our goal and while be simpler than 1.x, it is now more flexible than 1.x. We will listen to customer feedbacks and keep on improving it.
As you suggested, we will add more use cases and howtos to our documentation and set up related sample projects on demo.pmease.com to guide users on basic setups.

Thanks