-
Notifications
You must be signed in to change notification settings - Fork 30
/
.cruiseControlMode-gitlab-ci.yml
84 lines (78 loc) · 2.86 KB
/
.cruiseControlMode-gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#Copyright 2021 The MathWorks, Inc.
# This .yml file corresponds to the child pipeline for the CruiseControlMode model
# defining the stages
stages:
- Verify
- Build
- Testing
- Package
- Deploy
# This job executes the Model Advisor Check for the model
CruiseControlModeMA:
stage: Verify
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); CruiseControlModeModelAdvisor;"
artifacts:
when: always
paths:
- $LOGS_PATH/logs/
- ./Design/CruiseControlMode/pipeline/analyze/**/*
# This job performs code generation on the model
CruiseControlModeBuild:
stage: Build
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); CruiseControlModeBuild;"
artifacts:
when: always
paths:
- ./Code/codegen/CruiseControlMode_ert_rtw
- ./Design/CruiseControlMode/pipeline/analyze/**/*
- $LOGS_PATH/logs/
# This job executes the unit tests defined in the collection
CruiseControlModeTest:
stage: Testing
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); CruiseControlModeTest;"
artifacts:
when: always
paths:
- $LOGS_PATH/logs/
- ./Design/CruiseControlMode/pipeline/analyze/**/*
- ./Code/codegen/CruiseControlMode_ert_rtw
reports:
junit: ./Design/CruiseControlMode/pipeline/analyze/testing/CruiseControlModeJUnitFormatTestResults.xml
# The summary report is generated which shows results from the previous stages. Any logs that were generated in the previous stages will be cleared after this stage
CruiseControlModePackage:
stage: Package
tags:
- testci
script:
- echo "The model CruiseControlMode has been checked"
- echo "There is a Summary report generated cruiseControlModeReport.html "
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); generateXMLFromLogs('CruiseControlMode'); generateHTMLReport('CruiseControlMode'); deleteLogs;"
artifacts:
when: always
paths:
- ./Design/CruiseControlMode/pipeline/analyze/**/*
- ./Code/codegen/CruiseControlMode_ert_rtw
# a stage to assert that all stages in this child pipeline have passed successfully.
# a deploy stage placeholder where all the artifacts are available for download
CruiseControlModeDeploy:
stage: Deploy
tags:
- testci
script:
- echo "Any deployments of code can be made here"
- echo "All artifacts of previous stage can be found here"
- 'curl.exe --location --output "$ARTIFACTS_DOWNLOAD_PATH/CruiseControlModeArtifacts.zip" --header "PRIVATE-TOKEN: $CIPROJECTTOKEN" "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$CI_COMMIT_BRANCH/download?job=CruiseControlModePackage"'
artifacts:
when: always
paths:
- ./Design/CruiseControlMode/pipeline/analyze/**/*
- ./Code/codegen/CruiseControlMode_ert_rtw