Prepare, if not already done, the environment file and the configuration file to build a component.
The environment file must have following variables defined:
Check out a component with the MAIA Agent command maia checkout.
bundle exec maia checkout -c component_name
Go to the root directory of the component.
cd <%INSTALL_PATH%>/component_name
If the component has no configuration file, create a configuration file.
touch MAIA.yml
Edit the parameters in the configuration file. The file must contain at least the parameters version, rev and subcomponents.
Example of a basic component configuration file.
version: 4.0
rev: 1.0.2
subcomponents:
-name: core
-name: core_test
Each subcomponent must have a configuration file of their own.
Save the configuration file and make a commit to the version control system.
Use the MAIA Agent command checkout with option -s to checkout the component and its sub components for the collection.
a. To check out the component with an activity that is posted to the MAIA WebApp:
maia checkout -c component_name -s -z "comment"
b. To check out the component without an activity:
maia checkout -c component_name -s
c. To checkout an older version of a build, add the option -l and specify a
maia checkout -c component_name -s -l build_label
Use the MAIA Agent command build_clean to clean the build root.
maia build_clean -c component_name
Use the MAIA agent command fetch to fetch and unpack prebuilt deliverables from a repository (if defined in the configuration file).
maia fetch -c component_name
If you want to check whether the source code has changed before you build a component, use the MAIA Agent command build_check.
maia build_check -c component_name
Use the MAIA Agent command build to build the component.
a. To build the component with an activity that is posted to MAIA WebApp:
maia build -c component_name -p 0 -z "comment"
b. To build the component without an activity:
maia build -c component_name