Workflow for Simulink Cache and Jenkins

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

6 Downloads

Updated 21 Apr 2022

From GitHub

View License on GitHub

Workflow Example for Simulink Cache and Jenkins

View Workflow for Simulink Cache and Jenkins 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 this example, we keep track of the Simulink® cache files corresponding to each Jenkins build using a SQLite database. The database is located on a network and is accessible to everyone on the team and to the Jenkins machine.

  • 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 getJenkinsAttributes.m contains hard-coded userid and Jenkins API token to fetch build information from Jenkins.

  • 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 2022 The MathWorks, Inc.

Cite As

Puneet Khetarpal (2022). Workflow for Simulink Cache and Jenkins (https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.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.