Simple build pipeline aimed at projects that use Maven as build system. However, the build command can be changed to something else, globally and per project.
The following ADAMS application can be used for running the flows:
- Java 11+
- adams-basic-app
init.sh
execute.sh
execute.flow
|
+- config
| |
| +- .props files, one per project to build
|
+- src source code gets checked out here
|
+- bin the build output gets copied here
|
+- log the build log files are stored here
init.sh- downloads an ADAMS snapshot and sets it upexecute.sh- uses the downloaded ADAMS snapshot to execute the flow in headless mode
execute.flow performs the checkout/update/build of the source code.
You can override the following parameters by adding a execute.props
file alongside the flow:
git_cmd- the git executable and its options to use (e.g.,gitor/some/where/git -v)ssh_cmd- the ssh executable and its options to use (e.g.,ssh);-i SSH_KEYgets added automaticallybuild_cmd- the Maven executable and its options to use for building the projects (e.g.,mvn clean install -DskipTests=true -Dstyle.color=never)build_output- the regexp for locating the build output in the project dirs to copy to thebindirectory (e.g.,.*-bin.zip)clean_mvn_repo- whether to remove the$HOME/.m2/repositorydirectory before starting the builds
The configuration files in directory config are simple
Java properties files
with .props as extension.
repo=git@github.com:gitorg/my-repo.git
dir=my-repoIf the repository is a private one, you can also specify an ssh key (pointing to the private part of the key pair):
ssh_key=/some/where/build-keyYou can also override the following global settings on a per-project basis:
build_cmd- the command to build the source code (e.g.,mvn clean install -DskipTests=true -Dstyle.color=never)build_output- the regexp for locating the files to copy to thebindirectory (e.g.,.*-bin.zip)git_cmd- the git executable and its options to use (e.g.,gitor/some/where/git -v)ssh_cmd- the ssh executable and its options to use (e.g.,ssh);-i IDENTIFY_FILEgets added automatically
The .props config files get ordered by name and executed that way,
allowing you to define a deterministic build order.
You can find some example configurations for ADAMS in the examples directory. Simply transfer the ones starting with a number into the config directory to kick off a build (assuming you have Maven installed).
If you don't have LaTeX (e.g., TeX Live) installed,
you can use the examples/execute-no-latex.props
config as your execute.props config file to override the Maven build settings.