-
Notifications
You must be signed in to change notification settings - Fork 30
/
.driverSwRequest-gitlab-ci.yml
85 lines (78 loc) · 2.91 KB
/
.driverSwRequest-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 DriverSwRequest model
# defining the stages
stages:
- Verify
- Build
- Testing
- Package
- Deploy
# This job runs the Model Advisor Check file for DriverSwRequest models
DriverSwRequestMA:
stage: Verify
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); DriverSwRequestModelAdvisor;"
artifacts:
when: always
paths:
- $LOGS_PATH/logs/
- ./Design/DriverSwRequest/pipeline/analyze/**/*
# This job performs code generation on the model
DriverSwRequestBuild:
stage: Build
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); DriverSwRequestBuild;"
artifacts:
when: always
paths:
- ./Code/codegen/DriverSwRequest_ert_rtw
- ./Design/DriverSwRequest/pipeline/analyze/**/*
- $LOGS_PATH/logs/
# This job runs the unit tests defined in the collection
DriverSwRequestTest:
stage: Testing
tags:
- testci
script:
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); DriverSwRequestTest;"
artifacts:
when: always
paths:
- ./Design/DriverSwRequest/pipeline/analyze/**/*
- $LOGS_PATH/logs/
- ./Code/codegen/DriverSwRequest_ert_rtw
reports:
junit: ./Design/DriverSwRequest/pipeline/analyze/testing/DriverSwRequestJUnitFormatTestResults.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
DriverSwRequestPackage:
stage: Package
tags:
- testci
script:
- echo "The model DriverSwRequest has been checked"
- echo "There is a Summary report generated DriverSwRequestSummaryReport.html which is present in analyze folder"
- matlab -nodesktop -batch "openProject('CruiseControlExample.prj'); generateXMLFromLogs('DriverSwRequest'); generateHTMLReport('DriverSwRequest'); deleteLogs;"
artifacts:
when: always
paths:
- ./Design/DriverSwRequest/pipeline/analyze/**/*
- ./Code/codegen/DriverSwRequest_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
DriverSwRequestDeploy:
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/DriverSwRequestArtifacts.zip" --header "PRIVATE-TOKEN: $CIPROJECTTOKEN" "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$CI_COMMIT_BRANCH/download?job=DriverSwRequestPackage"'
artifacts:
when: always
paths:
- ./Design/DriverSwRequest/pipeline/analyze/**/*
- ./Code/codegen/DriverSwRequest_ert_rtw