This is an example where MAIA commands are run after your build commands to create traceability in MAIA.
On a host where build is to be done:
The environment file must have following variables defined:
- BUILD_ROOT
- DELIVERABLE_ROOT
- LOG_ROOT
- MAIA_CORE_HOST
- MAIA_CORE_HTTP_PORT
- MAIA_CORE_APP_CONTEXT
- MAIA_CORE_USE_SSL
- MAIA_CORE_API_TOKEN_FILE
- COMPONENT_CONF_FILE
- COMPONENT_STATE_FILE
- KAFKA_BROKERS
- KAFKA_TOPIC
SRC_ROOT is not used in this case.
An example on how you can integrate MAIA Agent into a existing build pipeline where call MAIA commands after your own build sequence. No Activities can be created in MAIA web app. The build command creates an SBOM file that is transferred to the MAIA web app.
:
:
make build
bundle exec maia git_scan
bundle exec maia build
:
:
Note that calling these commands creates two files.
PRODUCT = libxml2
VERSION = 2.9.9
PACKAGE = $(PRODUCT)-$(VERSION)
ARCHIVE = $(PACKAGE).tar.gz
URL = http://xmlsoft.org/sources/$(ARCHIVE)
CFG_ENV =
CFG_OPTS = --without-ssl --enable-shared --enable-static=no --with-python=no --without-iconv
state.download:
mkdir -p downloads && cd downloads && curl --fail $(URL) > $(ARCHIVE)
touch state.download
state.unpack: state.download
tar xvf downloads/$(ARCHIVE)
state.config: state.unpack
cd $(PACKAGE) && $(CFG_ENV) ./configure $(CFG_OPTS)
touch state.config
state.compile: state.config
$(MAKE) -C $(PACKAGE) -j
touch state.compile
build: state.compile
clean:
rm -rf downloads $(PACKAGE) state.*
version:
echo $(VERSION)
---
version: '5.0'
rev: <%= `make -s version`.chomp %>
build:
cmd:
dependency_generator:
- cd $(PACKAGE) && package_dependencies.rb $(PRODUCT) $(VERSION) $(URL)
An example on how you can integrate MAIA Agent into a existing build pipeline where call MAIA commands after your own build sequence. No Activities can be created in MAIA web app. The build command creates an SBOM file that is transferred to the MAIA web app.
:
mvn clean install
rm -f <%= log_root %>/depend.txt
mvn dependency:list > <%= log_root %>/depend.txt
bundle exec maia git_scan
bundle exec maia build
:
:
Note that calling these commands creates two files.
---
---
version: 5.0 # Protocol version, must be 5.0
build:
cmd:
dependency_generator:
- grep-dependencies <%= log_root %>/depend.txt <%= src_root %>/pom.xml <%= src_root %>/features.xml