padv.pipeline.AzureDevOpsOptions
Options for generating pipeline configuration file for Azure DevOps
Description
This object requires CI/CD Automation for Simulink Check. Use the padv.pipeline.AzureDevOpsOptions
object to
represent the desired options for generating an Azure® DevOps pipeline configuration file. To generate an Azure DevOps pipeline configuration file, use
padv.pipeline.AzureDevOpsOptions
as an input argument to the
padv.pipeline.generatePipeline
function. For more information on how to
use the pipeline generator to integrate into Azure DevOps, see Integrate Process into Azure DevOps.
Note
If you run MATLAB® using the -nodisplay
option or you use a machine that does
not have a display (like many CI runners and Docker® containers), you should set up a virtual display server before you include the
following built-in tasks in your process model:
Generate SDD Report
Generate Simulink Web View
Generate Model Comparison
For information, see Set Up Virtual Display Machines Without Displays.
Creation
Syntax
Description
returns configuration options for generating an Azure DevOps pipeline configuration file.options
= padv.pipeline.AzureDevOpsOptions
This functionality requires CI/CD Automation for Simulink Check.
sets properties using one or more name-value arguments. For example,
options
= padv.pipeline.AzureDevOpsOptions(Name=Value
)padv.pipeline.AzureDevOpsOptions(AgentPoolName="high_memory")
creates
an options object that specifies that a generated pipeline configuration file use
high_memory
as the Azure DevOps agent pool keyword.
Properties
AgentPoolName
— Keywords for Azure DevOps agent pools
"Default"
| string
Keywords for Azure DevOps agent pools, specified as a string. Use this property to specify which agent pools can run the jobs for the generated pipeline.
Example: "high_memory"
Data Types: string
ArtifactZipFileName
— Name of ZIP file for job artifacts
"padv_artifacts.zip"
(default) | string
Name of ZIP file for job artifacts, specified as a string.
Example: "my_job_artifacts.zip"
Data Types: string
GeneratedYMLFileName
— File name of generated Azure DevOps pipeline file
"simulink_pipeline"
(default) | string
File name of generated Azure DevOps pipeline file, specified as a string.
By default, the generated pipeline generates into the subfolder derived > pipeline, relative to the project root. To change where the pipeline file
generates, specify GeneratedPipelineDirectory
.
Example: "padv_generated_pipeline_file"
Data Types: string
MatlabInstallationLocation
— Folder where MATLAB is installed
"PATH_TO_MATLAB"
(default) | string
Folder where MATLAB is installed, specified as a string.
Example: "path/to/your/matlab/bin"
Data Types: string
EnableArtifactCollection
— When to collect build artifacts
"always"
, 1
, or
true
(default) | "never"
, 0
, or
false
| "on_success"
| "on_failure"
When to collect build artifacts, specified as:
"never"
,0
, orfalse
— Never collect artifacts"on_success"
— Only collect artifacts when the pipeline succeeds"on_failure"
— Only collect artifacts when the pipeline fails"always"
,1
, ortrue
— Always collect artifacts
If the pipeline collects artifacts, the child pipeline contains a job,
Collect_Artifacts
, that compresses the build artifacts into a ZIP
file and attaches the file to the job.
Example: "on_failure"
Data Types: logical
| string
ShellEnvironment
— Shell environment Azure DevOps uses to launch MATLAB
"bash"
(default) | string
Shell environment Azure DevOps uses to launch MATLAB, specified as one of these values:
"bash"
— UNIX® shell"pwsh"
— PowerShell Core script
Example: "pwsh"
Data Types: string
CheckoutSubmodules
— Checkout Git™ submodules
"false"
(default) | "true"
| "recursive"
Checkout Git submodules at the beginning of each pipeline stage, specified as either:
"false"
"true"
"recursive"
Example: "true"
Data Types: string
RunprocessCommandOptions
— Options for runprocess
command
padv.pipeline.RunProcessOptions
(default) | padv.pipeline.RunProcessOptions
object
Options for runprocess
command, specified as a
padv.pipeline.RunProcessOptions
object.
padv.pipeline.RunProcessOptions
has properties for the name-value
arguments in the runprocess
function, except for the arguments Tasks
,
Process
, Subprocesses
, and
FilterArtifact
.
For example, to have the pipeline generator use a command like
runprocess(DryRun = true)
in Azure DevOps, you can create a padv.pipeline.RunProcessOptions
object, specify the property values, and pass the object to
padv.pipeline.AzureDevOpsOptions
:
rpo = padv.pipeline.RunProcessOptions; rpo.DryRun = true; ado = padv.pipeline.AzureDevOpsOptions(RunprocessCommandOptions = rpo);
Example: padv.pipeline.RunProcessOptions
PipelineArchitecture
— Number of stages and grouping of tasks in CI pipeline
padv.pipeline.Architecture.SingleStage
(default) | padv.pipeline.Architecture.SerialStagesGroupPerTask
| padv.pipeline.Architecture.IndependentModelPipelines
Number of stages and grouping of tasks in CI pipeline, specified as either:
padv.pipeline.Architecture.SingleStage
— The pipeline has a single stage, named Runprocess, that runs each of the tasks in the process.padv.pipeline.Architecture.SerialStagesGroupPerTask
— The pipeline has one stage for each task in the process.padv.pipeline.Architecture.IndependentModelPipelines
— The pipeline contains parallel, downstream pipelines for each model. Each downstream pipeline independently runs the tasks associated with that model.To make sure the jobs run in parallel, make sure that you either:
Have multiple agents available
Configure your agent to run parallel jobs
For more information, see Integrate Process into Azure DevOps.
Note
The
SerialStagesGroupPerTask
and
IndependentModelPipelines
architectures define more complex
pipelines, which can cause the pipeline generator to produce configuration files
that exceed the maximum YAML file size limit for Azure DevOps. If Azure DevOps generates an error related to the maximum file size, consider
simplifying the pipeline architecture by using the SingleStage
pipeline architecture instead. For more information, see the Azure documentation for Imposed limits.
Example: padv.pipeline.Architecture.SingleStage
MatlabLaunchCmd
— Command to start MATLAB program
"matlab"
(default) | string
Command to start MATLAB program, specified as a string.
Use this property to specify how the pipeline starts the MATLAB program. This property defines how the script in the generated pipeline file launches MATLAB.
Example: "matlab"
Data Types: string
MatlabStartupOptions
— Command-line startup options for MATLAB
"-nodesktop -logfile output.log"
(default) | string
Command-line startup options for MATLAB, specified as a string.
Use this property to specify the command-line startup options that the pipeline uses
when starting the MATLAB program. This property defines the command-line startup options that
appear next to the -batch
option and
MatlabLaunchCmd
value in the"script"
section
of the generated pipeline file. The pipeline starts MATLAB with the specified startup options.
By default, the support package launches MATLAB using the -batch
option. If you need to run MATLAB without the -batch
option, specify the property
AddBatchStartupOption
as false.
Note
If you run MATLAB using the -nodisplay
option, you should set up a
virtual display server before you include the following built-in tasks in your process model:
Generate SDD Report
Generate Simulink Web View
Generate Model Comparison
For information, see Set Up Virtual Display Machines Without Displays.
Example: "-nodesktop -logfile mylogfile.log"
Data Types: string
AddBatchStartupOption
— Specify whether to open MATLAB using -batch
startup option
1
(true
) (default) | 0
(false
)
Specify whether to open MATLAB using -batch
startup option, specified as a numeric or
logical 0
(false
) or 1
(true
).
By default, the support package launches MATLAB in CI using the -batch
startup option.
If you need to launch MATLAB with options that are not compatible with -batch
,
specify AddBatchStartupOption
as false
.
Example: false
Data Types: logical
GeneratedPipelineDirectory
— Specify where the generated pipeline file generates
fullfile("derived","pipeline")
(default) | string
Specify where the generated pipeline file generates, specified as a string.
This property defines the directory where the generated pipeline file generates.
By default, the generated pipeline file is named
"simulink_pipeline.yml"
. To change the name of the generated
pipeline file, specify GeneratedYMLFileName
.
Example: fullfile("derived","pipeline","test")
Data Types: string
GenerateReport
— Generate Process Advisor build report
true
or 1
(default) | false
or 0
Generate Process Advisor build report, specified as a numeric or logical
1
(true
) or 0
(false
).
Example: false
Data Types: logical
ReportFormat
— File format for generated report
"pdf"
(default) | "html"
| "html-file"
| "docx"
File format for the generated report, specified as one of these values:
"pdf"
— PDF file"html"
— HTML report, packaged as a zipped file that contains the HTML file, images, style sheet, and JavaScript® files of the report"html-file"
— HTML report"docx"
— Microsoft® Word document
Example: "html-file"
ReportPath
— Name and path of generated report
"ProcessAdvisorReport"
(default) | string array
Name and path of generated report, specified as a string array.
By default, the report path uses a relative path to the project root and the
pipeline generator generates a report
ProcessAdvisorReport.pdf
.
Example: "myReport"
Data Types: string
StopOnStageFailure
— Stop running pipeline after stage fails
0
(false
) (default) | 1
(true
)
Stop running pipeline after stage fails, specified as a numeric or logical
0
(false
) or 1
(true
).
By default, the pipeline continues to run, even if a stage in the pipeline fails.
Example: true
Data Types: logical
CheckOutdatedResultsAfterMerge
— Check for outdated results after merge
1
(true
) (default) | 0
(false
)
Check for outdated results after merge, specified as a numeric or logical
1
(true
) or 0
(false
).
The pipeline generator no longer uses this property.
Example: false
Data Types: logical
EnablePipelineCaching
— Enable pipeline caching to support incremental builds in CI
1
(true
) (default) | 0
(false
)
Enable pipeline caching to support incremental builds in CI, specified as a numeric
or logical 0
(false
) or 1
(true
).
By default, generated pipelines use caching to help the performance of incremental
builds in CI. However, if a generated pipeline generates errors
when merging artifact information from parallel jobs,
you can disable pipeline caching by specifying
EnablePipelineCaching
as 0
(false
). Disabling pipeline caching increases build times, but can
help avoid merge
conflicts.
Example: false
Data Types: logical
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)