Manage components and tracks

You must have the suitable permissions to make changes.

This chapter contains information about how to manage components and tracks.

Create components and tracks in the MAIA WebApp.

The components and tracks in MAIA WebApp can be added manually via the user interface, created automatically through repository scanning, or imported using a rake task.

  1. Manually: The components and tracks are added one by one. This is a suitable option if you want to add a small amount of components and tracks. Go to Create a component and Create a track for more information.

  2. Automatically through repo scanning (git only): Components and tracks are added automatically when scanning a git repository not previously detected by MAIA WebApp.

  3. Import using rake: All components and tracks are added at once. You must specify an .yml-file with information about each component and track. This is a suitable option is you want to add a larger number of components and tracks.

    Import components and tracks:

    1. Open a terminal window on the host where MAIA Software is installed.

    2. Go to the tasks directory in the library for the package maia_core.

      cd installation path/htdocs/maia_core/lib/tasks

    3. Create the file import_file_name.yml.

      touch import_file_name.yml

    4. Open the import_file_name.yml file.

    5. Add parameters for each component and track that will be imported.

Name Description
name The name of the component.
menu_group The group name where the component will be included inside the Components menu. (Optional)
sort_order The number used to sort the components in the Components menu. (Optional)
kind The kind of component.
single or collection.
version_control_system The version control system for the component.
Can be subversion or git.
component_root For subversion: the path from repository root to this component.
For git: the parameters must be set to . (a dot).
tracks An array of the tracks that the component has.
name The name of the track.
repo The name of the repository that the component belongs to.
popular_name The popular name of the track. (Optional)
branch The name of the corresponding branch in the version control system.
product_root The name of the component that the track belongs to.
parent_track If the track is branched from another track in the same component, the name of the other track. (Optional)

Example:

components:
- name: rf-common
  menu_group: common
  sort_order: 0
  kind: single
  version_control_system: subversion
  component_root: kod
  tracks:
  - name: main
    repo: cop
    popular_name: Daily integration
    branch: trunk
    product_root: kf-common
  - name r1
    repo: cop
    popular_name: Bug fix track
    branch: tags/r1
    product_root: rf-common
    parent_track: main
  1. Save the import_file_name.yml file.

  2. Run the rake task import_components to import the components and tracks.

    rake maia:import_components FILE_NAME=import_file_name.yml RAILS_ENV=production


Components and corresponding tracks that already exist in MAIA will not be imported again.