Subcomponent
Subcomponent is a components orchestrator. You define components as being opaque projects that can be retrieved using various methods (git, svn, download, ...). Components can express dependencies between each other. This allows to run user-defined commands in a specific order.
This is expressed in the subcomponent description language:
subcomponents {
my-lib-component {
path: "where/the/lib/will/be/downloaded";
name: "My Lib";
fetch {
git {
url: "git://example.com/repo.git",
"https://example.com/repo.git",
"https://example-backup.com/repo.git";
branch: "dev";
shallow: true;
}
}
}
xen {
name: "Xen";
path: "xen-4.8.0";
fetch {
artifact {
url: "https://downloads.xenproject.org/release/xen/4.8.0/xen-4.8.0.tar.gz";
compression: "tar", "gz";
pgp-signature: "https://downloads.xenproject.org/release/xen/4.8.0/xen-4.8.0.tar.gz.sig";
pgp-pubkey: "83FE14C957E82BD9";
}
}
}
}
TODO List
- Dependencies between components
- status command
- Definition of command hooks
- gzip unpacker
- xz unpacker
- Booleans should be handled by the lexer, not by the parser
Documentation
Sphinx is used to generate the documentation, so you first need to have it installed:
Then, to generate the HTML documentation, you can just run the following:
The HTML documentation will be available in docs/_build/html/.
The manual page of subcomponent will be in docs/_build/man.
Tests
Subcomponent prefers to develop system tests instead of unit tests. You can run
unit tests via cargo:
System tests rely on robotframework, so you first need to make sure that this python module is installed:
The following commands are available
Please report failing tests!
Continuous Integration
We use travis to check that upstream code pass the implemented tests.
License
Subcomponent is MIT-licensed. See the LICENSE file for more details.