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:
- Team members commit design changes to Git™ .
- Jenkins pulls design changes from Git™ , runs simulations to test them, and archives the Simulink® cache files in the Jenkins build archive.
- 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.
We used the following articles to create this example.
- 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®.
- Agile Model-Based Design: Accelerating Simulink® Simulations in Continuous Integration Workflows goes over this workflow and best practices in more detail.
- Aerospace Toolbox
- Aerospace Blockset
- Simulink 3D Animation
- Embedded Coder
- Database Toolbox
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_toolsto access this database and the build archive to retrieve the Simulink® cache files into the project's cache folder.
getJenkinsAttributes.mcontains hard-coded userid and Jenkins API token to fetch build information from Jenkins.
The license for Workflow Example for Simulink Cache and Jenkins is available in the license.txt file in this repository.
Copyright 2023 The MathWorks, Inc.
Puneet Khetarpal (2023). simulink-cache-jenkins-workflow (https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.1.1), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
See release notes for this release on GitHub: https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.1.1
See release notes for this release on GitHub: https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.1
See release notes for this release on GitHub: https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.0.1