-
Notifications
You must be signed in to change notification settings - Fork 30
/
.crs_controller-gitlab-ci.yml
85 lines (78 loc) · 2.79 KB
/
.crs_controller-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
85
#Copyright 2021 The MathWorks, Inc.
# This .yml file corresponds to the child pipeline for the Crs_Controller model
# defining the stages
stages:
- verify
- build
- testing
- package
- Deploy
# This job executes the Model Advisor Checks for the model
Crs_ControllerMA:
stage: verify
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); crs_controllerModelAdvisor;"
artifacts:
when: always
paths:
- $LOGS_PATH/logs/
- ./Design/crs_controller/pipeline/analyze/**/*
# This job performs code generation on the model
Crs_ControllerBuild:
stage: build
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); crs_controllerBuild;"
artifacts:
when: always
paths:
- ./Code/codegen/crs_controller_ert_rtw
- ./Design/crs_controller/pipeline/analyze/**/*
- $LOGS_PATH/logs/
# This job executes the functional tests defined in the collection
Crs_ControllerTest:
stage: testing
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); crs_controllerTestFile;"
artifacts:
when: always
paths:
- $LOGS_PATH/logs/
- ./Design/crs_controller/pipeline/analyze/**/*
- ./Code/codegen/crs_controller_ert_rtw
reports:
junit: ./Design/crs_controller/pipeline/analyze/testing/crs_controllerJUnitFormatTestResults.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
Crs_ControllerPackage:
stage: package
tags:
- testci
script:
- echo "The model crs_controller has been checked"
- echo "There is a Summary report generated crs_controllerReport.html "
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); generateXMLFromLogs('crs_controller'); generateHTMLReport('crs_controller'); deleteLogs;"
artifacts:
when: always
paths:
- ./Design/crs_controller/pipeline/analyze/**/*
- ./Code/codegen/crs_controller_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
Crs_ControllerDeploy:
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/Crs_ControllerArtifacts.zip" --header "PRIVATE-TOKEN: $CIPROJECTTOKEN" "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$CI_COMMIT_BRANCH/download?job=Crs_ControllerPackage"'
artifacts:
when: always
paths:
- ./Design/crs_controller/pipeline/analyze/**/*
- ./Code/codegen/crs_controller_ert_rtw