We're updating the issue view to help you get more done. 

RFE/TECH DEBT: Create build script for Zanata

Description

We need a build script which makes it easy for anyone to build and test Zanata without memorising Maven property names and the relationships between them.

Basically, the Zanata developer should set some env vars like

  • JBOSS_HOME

  • EAP_ZIP_URL

Then say "deploy to JBOSS_HOME", or to "run tests against EAP", or "run tests against WildFly", and the build script will choose all the Maven parameters and invoke `mvn` with them.

This script should make development easier, especially when Maven profiles have to be changed (because it can be updated together with the pom), and it should also make it easier to set things up in Jenkins, eg for a matrix build.

Several of us probably have such a script locally, but it would be good to standardise on one script and make it work as well as possible, and to keep it maintained in one place. Be sure to consult with the other developers and steal from their scripts!

Also, we would need to find a way for the script to play nicely with Jenkins (since in a Maven job, Jenkins invokes Maven directly), perhaps by exporting the chosen Maven options for Jenkins to use.

Some example usage:

./build.sh help:
lists the build commands, explains them and the configuration variables

./build.sh deploy (given $JBOSS_HOME):
build and deploy to JBOSS_HOME as ROOT.war (no need to build functional tests)

./build.sh explode (given $JBOSS_HOME):
build and deploy exploded build to JBOSS_HOME as ROOT.war

./build.sh test-eap (given $EAP_ZIP_URL)
run tests against a downloaded EAP - it should set appserver=eap6, cargo.installation, cargo.basename, appserver.dir.name

./build.sh test-wildfly [optional version parameter]
run tests against a downloaded WildFly - it should set appserver=wildfly8 (or wildfly/whatever), cargo.installation, cargo.basename, appserver.dir.name, wildfly.version, wildfly.client.version

The script could also invoke etc/scripts/allocate-jboss-ports before running tests, to ensure unique ports during the tests.

Other options to handle:

  • quick build for Chrome (-Dchrome), or skip GWT entirely (-Dnogwt)

  • skip Arquillian tests but run functional tests

  • skip functional tests but skip Arquillian

  • run unit tests but skip functional tests (and cargo, etc)

  • build and set up for IDE-based functional tests (cargo:run)

  • anything else we need

These are just examples, the command names will probably change, and we probably have other build tasks to cover.

Status

Assignee

Sean Flanigan

Reporter

Sean Flanigan

Labels

Tested Version/s

None

Components

Fix versions

Priority

unspecified