Shared build number across build configurations (Specific scenario)

Answered

I have two build configurations. One for the productive binary build of the source code (.dll's) and another one to build the MSI.

The binary build configuration builds the VS solution and copies the compiled binaries to a network folder (deployment folder).

The MSI build configuration gets the binaries from the deployment folder, copies them to the build agent and creates an MSI with those dll's. Finally the MSI will be copied to the deployment folder.

 

At the moment I have a property that holds the version number including the build number. The build number is created by the autoinc plugin for TC. 

I would like to use the same build number for the binaries and the MSI. Right now it's always a different number because they are separated build configurations.

I tried also to create a snapshot dependency from the MSI build to the binary build and to create the version number like this:

1.0.0. %dep.<btID>.system.build.number%

All that happens is, that there is a new property created named %dep.<btID>.system.build.number% with no value.

So if the MSI build job is running, it's going to fail because there is no value for the newly created variable that should hold the value of the previously executed productive binary build job. 

 

Any suggestions what's wrong?

Or is there a better way for this scenario?

 

Kind regards

Patrick Bernhardsgrütter

3 comments

Hello Patrick,

The recommended approach is to use artifact dependency to download binaries in the second build configuration. If you need to build both configurations on the same sources version then you also need to configure snapshot dependencies.

Regarding shared build number, if you have dependency configured, then you should be able to use 1.0.0. %dep.<btID>.system.build.number% parameter in MSI build configuration. Have you replaced <btID> with build configuration ID of the "binary" build configuration? When you start to type the parameter "%" the hint should be shown, please use it to avoid mistakes.

0

 

Hi Alina,

Thank you for your reply. I will definitely try the artifact dependency. 

Your hint about typing "%dep." was very helpful! I missunderstood the documentation and therefore written the ID with "<" and ">". 

You saved my day! Thanks.

 

 

0

Thank you for the update, glad that problem was resolved!

0

Please sign in to leave a comment.