Hudson on Windows: Which is Better - Ant Files or Batch Files?

I have several hudson servers for our CI process.

Build tasks use Ant scripts as well as old-school * .bat files.

What do you prefer? What are the pros and cons?

(I believe that readability, familiarity with developers, and extensibility ...)

Are there any other options? We have tests .Net, Java and PHP.

+4
source share
2 answers

A package is a programming language (and not very good). Ant is the language of the dependency matrix. Who cares?

  • In a programming language, you specify the order in which everything happens. You are responsible for what is built and the order.

  • In the language of the dependency matrix, you simply specify the dependencies, and the program determines what to do and the order in which it should be done. One of the biggest problems developers have with Ant or Make is trying to force the build order instead of letting the build system take care of it.

Strings should always be executed using a dependency matrix language such as Ant.

Let Ant determine what needs to be built, and the order that needs to be built. Do not use the package. If you use batch scripts to call the Ant script bundle in the order you think you need to call them, you are doing it wrong. Ask the Ant script wizard to do this and use the <subant> calls. Let Ant do the hard stuff.

You can use the batch script program to do the preliminary work (for example, setting ANT_OPTS if Ant needs more memory, or setting environment variables like ANT_HOME and JAVA_HOME and the% PATH% variable to make sure that you are using the correct version of Java and Ant. In Hudson, you can install all of this in the Hudson task itself, so you don't need to invoke a batch script.

+10
source

*. Bat files almost limit you to dos / windows, such as shell scripts for Linux, while Ant / Maven is cross-platform and gives you the option to use a non-Windows CI server

+4
source

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


All Articles