How to build many projects with the same svn version number with hudson?

I am just starting with hudson and I would like to build my projects as my manual project did:

  • Get current version number svn rev.
  • Create all projects (each with a separate result) with revision number rev.
  • Start again from step 1, regardless of whether there were any changes at the same time (to detect non-deterministic errors that do not occur with each test run).

How can I configure this using hudson ?

+4
source share
4 answers

Just to extend sjohnston's post. Instead of checking the code in a known place, you can use the Clone Workspace SCM Plugin . Now you can refer to the check from the first task.

Alternatively, you can simply go through the revision number and pass it as a parameter to your build tasks. Build tasks can get the correct version of the code using the version number.

+3
source

Hudson really does not have good support for doing one SVN registration and then using it for several different tasks.

You can try the following:

  • Set up a task that simply logs into a known directory. Check the post-build-actions> build other projects checkbox and add all build tasks.
  • Customize each build job to copy the latest log, wherever the first job is. Create them regularly so that they continue to build, even when there are no checks.
  • It is possible to use the Locks and Latches plugin to configure locks between the upload task and the build tasks so that you do not finish with two tasks that tried to copy / modify files at the same time.

It sounds dirty and potentially fraught with problems, but it might work.

Alternatively, if you just want to combine all of these projects together, you can set up one task that performs validation and has a build step for each project. Then you can simply check the Build Periodically trigger to execute as often as you want (or at least as often as Hudson can go through tasks).

+2
source

I answer the problem:

Use the SVN post-commit hook to start pre-work, which: a) checks the code; b) receives a revision of SVN (for example, through SVNVERSION.EXE); and c) uses the Parameterized Trigger plugin to initiate a β€œreal” build job on a specific SVN version identifier.

This way you separate the SCM connection from the actual building, so that you can be very specific regarding the construction of each revision.

+1
source

you can always add a shell script as a build step.

use a parameterized assembly, declare the revision parameter as a parameter, use the parameter in your shell script (completely skipping the Hudson SCM control)

http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Build

0
source

Source: https://habr.com/ru/post/1310041/


All Articles