Workflow Example for Simulink Cache and Jenkins
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.
Important References
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.
Requirements
Release R2021a
MathWorks Products
- 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.
License
The license for Workflow Example for Simulink Cache and Jenkins is available in the license.txt file in this repository.
Community Support
Copyright 2023 The MathWorks, Inc.
Cite As
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 Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Apollo_11_Jenkins_Simulink_Cache/ci_tools
Apollo_11_Jenkins_Simulink_Cache/data
Apollo_11_Jenkins_Simulink_Cache/scripts
Apollo_11_Jenkins_Simulink_Cache/tests
Apollo_11_Jenkins_Simulink_Cache/utilities
Apollo_11_Jenkins_Simulink_Cache/libraries
Apollo_11_Jenkins_Simulink_Cache/models
Apollo_11_Jenkins_Simulink_Cache/data
Version | Published | Release Notes | |
---|---|---|---|
1.1.1.0 | See release notes for this release on GitHub: https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.1.1 |
||
1.1 | See release notes for this release on GitHub: https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.1 |
||
1.0.1 | See release notes for this release on GitHub: https://github.com/mathworks/simulink-cache-jenkins-workflow/releases/tag/v1.0.1 |
||
1.0 |