Locally Reproduce Issues Found in CI
With the CI/CD Automation for Simulink Check support package, you can run your process in CI, download the job artifacts, and locally view the results in Process Advisor. When there are failures in CI, you can use Process Advisor to debug and find issues in your artifacts that you need to fix on your local machine. You can copy results from CI jobs onto your local machine by cloning a copy of the project that you ran in CI and copying the latest job artifacts.
For information about how to run your process in CI, see Integrate Process into CI.
Get Latest Project Files
In MATLAB®, get the latest project files by cloning a copy of the project onto your local machine. For more information, see Clone Remote Git Repository into New Project.
Close your local copy of the project. You must close the project before you attempt to copy CI artifacts into the project folder.
Download and Copy CI Artifacts into Project
In your CI system, open the job that you want to inspect locally and download the artifacts that the job generated. Job artifacts typically download as a ZIP file.
If you are using the pipeline generator,
padv.pipeline.generatePipeline
, the Collect_Artifacts job automatically collects and compresses the build artifacts from your pipeline into a ZIP file that you can download.Close your local copy of the project if you have it open in MATLAB.
Extract the files from the ZIP file and copy the artifacts into the folder for your local copy of the project. The copied artifacts do not need to be added to the MATLAB path or project path.
Open your local copy of the project in MATLAB.
Open the Process Advisor app. If you see a warning banner, click Refresh Tasks.
Debug in Process Advisor
After you refresh the tasks, you can use Process Advisor to:
See the task results from the CI job in your local Process Advisor app
Re-run tasks locally to reproduce the CI failure on your local machine
Make changes to your project to fix the issues observed in CI
Re-run tasks locally to confirm that you resolve open issues before submitting to source control
For more information, see Automate and Run Tasks with Process Advisor
Limitations on Parallel Pipelines
If you use a parallel pipeline architecture, like
IndependentModelPipelines
, each parallel pipeline
generates separate artifact database files for each parallel branch.
Process Advisor and the build system can only load one
artifacts.dmr
file at a time, so when you view the
generated task statuses and results
on your local
machine, you see incomplete or outdated task results.