1

I'd like to share how I implemented a solution to a problem I had, to get some feedback and maybe learn some new feature of buildbot.

Scenario:

Create a package of a given software, and upload the package to the buildmaster into a shared folder. The package name contains some data that are known to the build system (i.e. Makefiles) specifically the sw version. Let's assume the package name is: myapp-1.2.3-r2435.tar.gz

Question:

How do I send to the buildslave steps the required to build up the very same package name, so that the buildslave can upload the package? Specifically I need to know the version number (but I guess this could be any param)

Implemented (and working) solution: The makefile, once the compilation process is completed, writes a file with the required param. The slave uses the SetProperty() step to read the content of the file into a custom named property Once I have the value of interest in the property (let's say APP_VERSION) I use it to build the package name with the same pattern used by the build system.

The described solution works, but I do not really like it because:

1) it's complicated, hence, I guess, fragile

2) it is not OS independent (I use "echo $VAR > file" to write the file, and "cat file" to read it and set the buildslave Property)

Is there in your opinion a better way to solve this issue? Do you have any suggestion to make the solution OS independent? (It will not work for sure on Windows, while my package shoudl be built on Windows OS too)

sergico
  • 2,595
  • 2
  • 29
  • 40
  • 1
    I'm using branch names for a similar issue. (I have package/release_number named branches that trigger the packaging build). Previously as I'm coding in python I was directly importing the file that declared the version number variable. – hithwen May 19 '14 at 11:35
  • @hithwen That's an interesting alternative... will give it a try thanks :) – sergico May 19 '14 at 19:45

0 Answers0