How to set up Incremental Builds for Continuous Integration

This guide describes how to implement an incremental build workflow. By using the Unified Graphics Generator (UGG) to pre-generate artifacts, you can significantly reduce the time required to generate EHANDBOOK Containers in automated CI/CD pipelines.

Prerequisites

  • EHANDBOOK Container-Build (EHB-CB) installed on the build server.

  • Valid licenses for EHB-CB and the corresponding UGG add-ons (e.g., EHB_CB_UGG_SIMULINK).

  • A CI environment (e.g., Jenkins, GitLab CI) with access to the ECU software source code.

Step 1: Initialize the Artifact Repository

Create a dedicated directory on your build server to act as the Artifact Repository. This folder will store the pre-generated interactive models and SVG graphics.

This directory must persist between CI jobs to allow the EHB-CB to reuse unchanged artifacts.

Step 2: Configure the UGG for Pre-generation

Integrate a UGG call into your build script. Use the CLI to target the models.

Example CLI command for UGG:

graphicGen.exe -i "C:\Project\Models" -o "C:\CI_Build\Artifact_Repo" -gensvg -genmaps

  • -i: Path to your raw model files.

  • -o: Path to the Artifact Repository.

  • -gensvg: Generates SVG images for the documentation.

  • -genmaps: Generates the necessary map files for interactive model navigation.

Step 3: Implement Incremental Logic

Configure your CI pipeline to only run the UGG on modified files. 1. Detect Changes: Use git diff or similar tools to identify changed model files. 2. Targeted UGG Run: Pass only the changed files to the UGG. Unchanged artifacts remain in the repository.

Step 4: Assemble the Container with EHB-CB

Run the EHB-CB tool-chain and use the -ugg flag. This tells the tool to fetch pre-generated interactive models and images instead of converting them from scratch.

Example CLI command for EHB-CB:

eHandbookCB.exe -i "C:\Project\Input_Structure" -o "C:\Project\Output" -n "ECU_Documentation" -ugg

  • -i: Path to the standard EHB-CB input (e.g., the root of your directory-based structure).

  • -ugg: Enables the use of pre-generated artifacts from the UGG.

Ensure that the output directory of the UGG (Step 2) matches the expected artifact location for the EHB-CB framework.

Step 5: Verification

  1. Check Logs: Ensure the ContainerName.log indicates that artifacts were successfully integrated.

  2. Validate Container: Open the .ehb file in EHANDBOOK-NAVIGATOR to verify that interactive models and graphics are correctly displayed.