History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3449
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Phong Trinh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Need an advice on build number of multiple configurations

Created: 04/Oct/19 03:50 AM   Updated: 12/Oct/19 12:13 AM
Component/s: None
Affects Version/s: 9.0.11
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
 I have the following configurations:
 ConfigA triggers ConfigB
 ConfigA triggers ConfigC
 ConfigB triggers ConfigD

 How to set up the build numbers of the configurations to make the follows happen:
 I run ConfigA, the build number of all of the configurations are the same, for example 1. I run ConfigB, the build number of ConfigB and ConfigD are 2. Then I run ConfigA again, the build number of all of the configurations are now 3.

 Any advice is appreciated.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [05/Oct/19 12:24 AM]
1. Configure A's next build version as a number
2. Configure B,C and D's build version as ${vars.getValue("buildVersionOfA")}
3. For every triggering step, define the triggering property "buildVersionOfA" with value set to ${build.version}

Phong Trinh [07/Oct/19 05:23 PM]
I set the build version as your advice and then ran the follows:
 1) Ran ConfigA, the build version of all of the configurations are 0 which was as expected.
 2) Ran ConfigB and got an error because the variable, buildVersionOfA was not defined. Then I added the variable and ran ConfigB, the build number never changed. The issue is that the version of ConfigB and ConfigD is not bumped up when I run ConfigB.

Robin Shen [07/Oct/19 11:36 PM]
I misunderstood your intention previously. Below steps will do exactly what you want:
1. Assume A, B, C and D has a common ancestor configuration, say "P". In "P" define a variable say "version" with initial value set to "1"
2. In "P", define next build version as ${vars.getValue("upstreamVersion")!=null? vars.getValue("upstreamVersion"): vars.get("version").increase())}
3. In A, B, C and D, edit the next build version to have them inherit from "P" (note if "P" is not the direct parent, you will need to change all next build version in intermediate configurations to inherit from parent)
4. In "trigger other build" step of A, B and C, define variable "upstreamVersion" with value set to "${build.version}"

Phong Trinh [08/Oct/19 02:34 AM]
Thank you very much, Robin. I am going to try this and will keep you informed.

Phong Trinh [09/Oct/19 01:02 AM]
 The solution works great for me. Thank you very much for your help. The more I work on QuickBuild, the more I like it. It is one of the best CI tools.
 May I ask another question if you don't mind? I have ConfigA, and ConfigB trigger ConfigC. The duration of ConfigA and ConfigB may be changed. How can I set up the configurations to make the last one finished trigger ConfigC? For example, if ConfigA finishes last than it will trigger ConfigC. If next time ConfigB finishes last than it will trigger ConfigC. Any advice is appreciated. Thank you in advance.

Robin Shen [09/Oct/19 11:26 PM]
I guess the underline logic is that C should not be fired before A or B finishes. If so, you may make C depends on A and B. And then fires C directly.

Phong Trinh [11/Oct/19 02:30 AM]
 It works. Thank you, Robin.

Change by Robin Shen [12/Oct/19 12:13 AM]
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]