How to build your project on Jenkins
We've created a script named create_package that will help you build your project, and packages of it (this script is already installed on every jenkins slave created with create_buildcosy or create_imagevm). In order to use this script you have to fill the configuration file of buildeb and put it somewhere in your git repository (or whatever VCS you use). And you have to make sure that, when you run buildeb with that configuration file you've filled, it works.
Here's how the script works. It will first try to build your project on six minimal debian systems (stable (both 32bits and 64bits), unstable (32bits & 64bits) and testing (32bits & 64bits)), to make sure that your source code compiles correctly and also to make sure that you've filled the build dependencies correctly. If all builds fails, the script will terminate with an error. Otherwise, it will continue to the next step.
So, if a build has been successful on a system, it will try to build packages of your project on it. If one or more packages have been built, they're automatically uploaded on CosyVerif's repository.
The script has some options you can use if you want to modify its behaviour:
- -c <configuration_file>: Path leading to the configuration file. The path must be relative to the root directory of your git repository
- -d <makefile_dir>: Path leading to the directory containing the makefile of your project.
- -b: Build only. It means that the script won't build packages.
- -p: Packages only. It means that the script won't try to build your project on minimal debian system. It will directly try to build packages.
Here's an example of how to use create_package