This repository was archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.settings.props
200 lines (174 loc) · 9.68 KB
/
test.settings.props
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="Run"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
The following ItemGroup defines which steps are taken during the test process. The order of the items in the item group
determines in which order the test steps are executed.
The following default steps are always executed:
- Clearing the existing build artifacts from the workspace and creation of the required directories. Clearing the
existing build artifacts is only executed if the $(ShouldClean) property is set to 'true'.
- Restoring the NuGet packages as specified in the '$(DirWorkspace)\packages.config' file. Additionally also restores the
NuGet packages as specified in the nBuildKit specific 'packages.config' files.
The following test steps are by default provided through the given properties:
$(TestStepsPrepareVcsBranch) - When building from a GIT repository on Jenkins ensures that the current checkout has the same branch
name as the remote tracking branch.
$(TestStepsPrepareGetVersion) - Gathers version information and stores it in a temporary file for use by the rest of the test process.
Currently supported methods of gathering version information are using (in order):
- The version defined by a custom MsBuild task which is defined in a file of which the path is stored
in the 'ScriptGetVersion' property. The task should output:
- VersionMajor
- VersionMinor
- VersionPatch
- VersionBuild
- VersionPreRelease
- VersionSemantic
- VersionSemanticFull
- VersionSemanticNuget
- The version stored in an 'version.xml' file which contains an MsBuild property group with
the properties:
- BuildNumber
- VersionMajor
- VersionMinor
- VersionPatch
- VersionBuild
- VersionPreRelease
- The GitVersion tool (https://github.com/ParticularLabs/GitVersion)
- The GitHubFlowVersion tool (https://github.com/JakeGinnivan/GitHubFlowVersion)
$(TestStepsPrepareGetIssueIds) - Gets the issue IDs from the commits on the current branch and stores them in a temp file for later use.
$(TestStepsPrepareReleaseNotes) - Gathers the release notes and stores them for later use during the test process. Release notes
are retrieved with the GitReleaseNotes tool (https://github.com/GitTools/GitReleaseNotes) which
currently allows gathering release notes from GitHub, Jira and YouTrack
$(TestStepsPrepareVcsInfo) - Stores the Version Control System (VCS) information in a file for later use.
Currently supported version control systems is GIT
$(TestStepsPrepareGenerateFiles) - Generates one or more files from a set of template files.
Additional test steps can be defined by providing the path to the MsBuild script that should be executed
for that step, e.g. adding a test step that points to the 'c:\stuff\MyCoolScript.msbuild' will execute
that script.
Each script has the following properties passed to it:
$(SharedPropertyFile) - The full path to the settings.props file (i.e. this file).
$(NBuildKitVersion) - The full version of the nBuildKit library that is executing the build.
$(DirNBuildKitMsBuild) - The full path to the directory that contains the nBuildKit scripts.
$(DirNBuildKitMsBuildShared) - The full path to the directory that contains the shared nBuildkit scripts.
$(DirNBuildKitMsBuildExtensions) - The full path to the directory that contains the nBuildKit extension scripts.
$(DirNBuildKitMsBuildTemplates) - The full path to the directory that contains the nBuildKit templates.
-->
<ItemGroup>
<TestStepsToExecute Include="$(TestStepsPrepareVcsBranch)">
<Properties>
</Properties>
<Groups>
Prepare;
</Groups>
</TestStepsToExecute>
<TestStepsToExecute Include="$(TestStepsPrepareGetVersion)">
<Properties>
</Properties>
<Groups>
Prepare;
</Groups>
</TestStepsToExecute>
<TestStepsToExecute Include="$(TestStepsPrepareGetIssueIds)">
<Properties>
</Properties>
<Groups>
Prepare;
</Groups>
</TestStepsToExecute>
<TestStepsToExecute Include="$(TestStepsPrepareReleaseNotes)">
<Properties>
</Properties>
<Groups>
Prepare;
</Groups>
</TestStepsToExecute>
<TestStepsToExecute Include="$(TestStepsPrepareVcsInfo)">
<Properties>
</Properties>
<Groups>
Prepare;
</Groups>
</TestStepsToExecute>
<TestStepsToExecute Include="$(TestStepsPrepareGenerateFiles)">
<Properties>
</Properties>
<Groups>
Generate;
Prepare;
</Groups>
</TestStepsToExecute>
</ItemGroup>
<!--
Define the scripts that should be executed when any one of the test steps fails.
Steps can be defined by providing the path to the MsBuild script that should be executed
for that step, e.g. adding a test step that points to the 'c:\stuff\MyCoolScript.msbuild' will execute
that script.
Each script has the following properties passed to it:
$(SharedPropertyFile) - The full path to the settings.props file (i.e. this file).
$(NBuildKitVersion) - The full version of the nBuildKit library that is executing the build.
$(DirNBuildKitMsBuild) - The full path to the directory that contains the nBuildKit scripts.
$(DirNBuildKitMsBuildShared) - The full path to the directory that contains the shared nBuildkit scripts.
$(DirNBuildKitMsBuildExtensions) - The full path to the directory that contains the nBuildKit extension scripts.
$(DirNBuildKitMsBuildTemplates) - The full path to the directory that contains the nBuildKit templates.
Additionally any properties defined by the 'Properties' section are also pushed up.
-->
<ItemGroup>
<!--
<TestFailureStepsToExecute Include="">
<Properties>
</Properties>
</TestFailureStepsToExecute>
-->
</ItemGroup>
<!--
**** PREPARE - WORKSPACE ****
-->
<ItemGroup>
<!--<TestFilesToCopy Include="$(DirTest)\**\*.*">
<TargetDirectory>$(DirBuildTest)</TargetDirectory>
</TestFilesToCopy>-->
</ItemGroup>
<!--
**** PREPARE - GENERATE FILES ****
-->
<!--
The list of all files that should be generated and their template files.
The template file may contain zero or more template parameters as indicated at the top of this
file. Template parameters must be enclosed in '${}'.
Additional parameters can be provided through the 'TemplateTokens' ItemGroup below.
-->
<ItemGroup>
<!--<TestFilesToGenerate Include="$(DirBuildTemp)\MyFile.txt">
<Template>$(DirTemplates)\MyTemplatefile.txt</Template>
<Encoding>UTF-8</Encoding>
</TestFilesToGenerate>
<TestFilesToGenerate Include="$(DirBuildTemp)\MyOtherFile.txt">
<Template>$(DirTemplates)\MyOtherTemplatefile.txt</Template>
<Token>MyAdditionalTemplateParameter</Token>
<ReplacementValue>MyAdditionalTemplateValue</ReplacementValue>
<Encoding>UTF-8</Encoding>
</TestFilesToGenerate>-->
</ItemGroup>
<!--
*************************************
* *
* SHARED TOOLS *
* *
*************************************
-->
<!-- Overrides for the tools paths -->
<PropertyGroup>
<!-- Currently there are no test specific tools -->
</PropertyGroup>
<!--
*****************************************
* *
* NBUILDKIT SPECIFIC SETTINGS *
* *
*****************************************
-->
<PropertyGroup>
<!-- Defines whether the current script file has been loaded / imported or not -->
<ExistsTestSettings>true</ExistsTestSettings>
</PropertyGroup>
</Project>