image thumbnail

Workflow for Simulink Cache and Jenkins

version 1.0.1 (26.9 MB) by Puneet Khetarpal
This example highlights an Agile development workflow using Jenkins, Git, and Simulink cache files.

1 Download

Updated 07 Oct 2021

From GitHub

View license on GitHub

Workflow Example for Simulink Cache and Jenkins

View simulink-cache-jenkins-workflow on File Exchange

This repository contains a Simulink® project and a few utility scripts, which highlight an Agile development workflow using Jenkins™, Git™, and Simulink® cache files.

This workflow has three major steps:

  1. Team members commit design changes to Git™ .
  2. Jenkins pulls design changes from Git™ , runs simulations to test them, and archives the Simulink® cache files in the Jenkins build archive.
  3. Team members sync the latest design changes from Git™ and the associated cache files from the build archive, and then run system simulations using the cache files.

Workflow Diagram

Important References

We used the following articles to create this example.

  1. Continuous Integration for Verification of Simulink® Models discusses setting up and configuring a MATLAB® project to work with Jenkins™ and GitLab® and also covers using Continuous Integration with Simulink®.
  2. Agile Model-Based Design: Accelerating Simulink® Simulations in Continuous Integration Workflows goes over this workflow and best practices in more detail.

Requirements

Release R2021a

MathWorks Products

(http://www.mathworks.com)

  • MATLAB
  • Simulink
  • Stateflow
  • Aerospace Toolbox
  • Aerospace Blockset
  • Simulink 3D Animation
  • Embedded Coder
  • Database Toolbox

Notes

  • We installed and configured Jenkins as recommended by the above-mentioned articles. In particular, we changed the Jenkins configuration for workspace and builds directory in the config.xml file to

    <workspaceDir>L:\JenkinsProj\${ITEM_FULL_NAME}\workspace</workspaceDir>
    <buildsDir>L:\JenkinsProj\${ITEM_FULL_NAME}\builds</buildsDir>
    
  • In this example, we keep track of the Simulink® cache files corresponding to each Jenkins build using a SQLite database.

  • We use the scripts in ci_tools to access this database and the build archive to retrieve the Simulink® cache files into the project's cache folder.

  • The script getJenkinsDir.m contains a hard-coded path to the Jenkins directory in the shared drive.

  • Additionally, we use the script syncSLXCForCurrentHash.m to sync Simulink® cache files from the build archive. Sync Files Image

License

The license for Workflow Example for Simulink Cache and Jenkins is available in the license.txt file in this repository.

Community Support

MATLAB Central

Copyright 2021 The MathWorks, Inc.

Cite As

Puneet Khetarpal (2021). Workflow for Simulink Cache and Jenkins (https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.0.1), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with R2021a and later releases
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Apollo_11_Jenkins_Simulink_Cache/data

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.