Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 81fdad3

Browse files
authored
Adding begin/end steps to build definitions (#29198)
* Adding begin/end steps to build definitions. * Replicating complete changes from master branch into derived branches.
1 parent 1cb15df commit 81fdad3

8 files changed

+278
-18
lines changed

buildpipeline/DotNet-CoreFx-Trusted-Linux-Crossbuild.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
{
22
"build": [
3+
{
4+
"environment": {},
5+
"enabled": true,
6+
"continueOnError": true,
7+
"displayName": "run begin.sh",
8+
"timeoutInMinutes": 0,
9+
"alwaysRun": true,
10+
"task": {
11+
"id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d",
12+
"versionSpec": "0.*",
13+
"definitionType": "task"
14+
},
15+
"inputs": {
16+
"type": "InlineScript",
17+
"scriptPath": "",
18+
"args": "",
19+
"cwd": "",
20+
"failOnStandardError": "false",
21+
"script": "if [ -f \"$AGENTTOOLSPATH/begin.sh\" ]; then echo \"$AGENTTOOLSPATH/begin.sh script found. Executing...\"; $AGENTTOOLSPATH/begin.sh ; else echo \"$AGENTTOOLSPATH/begin.sh script does not exist. Moving on.\" ; fi"
22+
}
23+
},
324
{
425
"environment": {},
526
"enabled": true,
@@ -331,6 +352,27 @@
331352
"workingFolder": "",
332353
"failOnStandardError": "false"
333354
}
355+
},
356+
{
357+
"environment": {},
358+
"enabled": true,
359+
"continueOnError": true,
360+
"displayName": "run end.sh",
361+
"timeoutInMinutes": 0,
362+
"alwaysRun": true,
363+
"task": {
364+
"id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d",
365+
"versionSpec": "0.*",
366+
"definitionType": "task"
367+
},
368+
"inputs": {
369+
"type": "InlineScript",
370+
"scriptPath": "",
371+
"args": "",
372+
"cwd": "",
373+
"failOnStandardError": "false",
374+
"script": "if [ -f \"$AGENTTOOLSPATH/end.sh\" ]; then echo \"$AGENTTOOLSPATH/end.sh script found. Executing...\"; $AGENTTOOLSPATH/end.sh ; else echo \"$AGENTTOOLSPATH/end.sh script does not exist. Moving on.\" ; fi"
375+
}
334376
}
335377
],
336378
"options": [
@@ -538,4 +580,4 @@
538580
"revision": 418099111,
539581
"visibility": "organization"
540582
}
541-
}
583+
}

buildpipeline/DotNet-CoreFx-Trusted-Linux.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
{
22
"build": [
3+
{
4+
"environment": {},
5+
"enabled": true,
6+
"continueOnError": true,
7+
"displayName": "run begin.sh",
8+
"timeoutInMinutes": 0,
9+
"alwaysRun": true,
10+
"task": {
11+
"id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d",
12+
"versionSpec": "0.*",
13+
"definitionType": "task"
14+
},
15+
"inputs": {
16+
"type": "InlineScript",
17+
"scriptPath": "",
18+
"args": "",
19+
"cwd": "",
20+
"failOnStandardError": "false",
21+
"script": "if [ -f \"$AGENTTOOLSPATH/begin.sh\" ]; then echo \"$AGENTTOOLSPATH/begin.sh script found. Executing...\"; $AGENTTOOLSPATH/begin.sh ; else echo \"$AGENTTOOLSPATH/begin.sh script does not exist. Moving on.\" ; fi"
22+
}
23+
},
324
{
425
"environment": {},
526
"enabled": true,
@@ -331,6 +352,27 @@
331352
"workingFolder": "",
332353
"failOnStandardError": "false"
333354
}
355+
},
356+
{
357+
"environment": {},
358+
"enabled": true,
359+
"continueOnError": true,
360+
"displayName": "run end.sh",
361+
"timeoutInMinutes": 0,
362+
"alwaysRun": true,
363+
"task": {
364+
"id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d",
365+
"versionSpec": "0.*",
366+
"definitionType": "task"
367+
},
368+
"inputs": {
369+
"type": "InlineScript",
370+
"scriptPath": "",
371+
"args": "",
372+
"cwd": "",
373+
"failOnStandardError": "false",
374+
"script": "if [ -f \"$AGENTTOOLSPATH/end.sh\" ]; then echo \"$AGENTTOOLSPATH/end.sh script found. Executing...\"; $AGENTTOOLSPATH/end.sh ; else echo \"$AGENTTOOLSPATH/end.sh script does not exist. Moving on.\" ; fi"
375+
}
334376
}
335377
],
336378
"options": [
@@ -546,4 +588,4 @@
546588
"revision": 418099111,
547589
"visibility": "organization"
548590
}
549-
}
591+
}

buildpipeline/DotNet-CoreFx-Trusted-OSX.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
{
22
"build": [
3+
{
4+
"environment": {},
5+
"enabled": true,
6+
"continueOnError": true,
7+
"displayName": "run begin.sh",
8+
"timeoutInMinutes": 0,
9+
"alwaysRun": true,
10+
"task": {
11+
"id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d",
12+
"versionSpec": "0.*",
13+
"definitionType": "task"
14+
},
15+
"inputs": {
16+
"type": "InlineScript",
17+
"scriptPath": "",
18+
"args": "",
19+
"cwd": "",
20+
"failOnStandardError": "false",
21+
"script": "if [ -f \"$AGENTTOOLSPATH/begin.sh\" ]; then echo \"$AGENTTOOLSPATH/begin.sh script found. Executing...\"; $AGENTTOOLSPATH/begin.sh ; else echo \"$AGENTTOOLSPATH/begin.sh script does not exist. Moving on.\" ; fi"
22+
}
23+
},
324
{
425
"environment": {},
526
"enabled": true,
@@ -247,6 +268,27 @@
247268
"Parallel": "false",
248269
"ParallelCount": "8"
249270
}
271+
},
272+
{
273+
"environment": {},
274+
"enabled": true,
275+
"continueOnError": true,
276+
"displayName": "run end.sh",
277+
"timeoutInMinutes": 0,
278+
"alwaysRun": true,
279+
"task": {
280+
"id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d",
281+
"versionSpec": "0.*",
282+
"definitionType": "task"
283+
},
284+
"inputs": {
285+
"type": "InlineScript",
286+
"scriptPath": "",
287+
"args": "",
288+
"cwd": "",
289+
"failOnStandardError": "false",
290+
"script": "if [ -f \"$AGENTTOOLSPATH/end.sh\" ]; then echo \"$AGENTTOOLSPATH/end.sh script found. Executing...\"; $AGENTTOOLSPATH/end.sh ; else echo \"$AGENTTOOLSPATH/end.sh script does not exist. Moving on.\" ; fi"
291+
}
250292
}
251293
],
252294
"options": [

buildpipeline/DotNet-CoreFx-Trusted-Windows-NoTest.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"environment": {},
55
"enabled": true,
66
"continueOnError": true,
7-
"alwaysRun": false,
8-
"displayName": "Run AgentTools/Begin.ps1",
7+
"displayName": "run begin.ps1",
98
"timeoutInMinutes": 0,
10-
"condition": "succeededOrFailed()",
9+
"alwaysRun": true,
1110
"task": {
1211
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
1312
"versionSpec": "2.*",
@@ -17,7 +16,7 @@
1716
"targetType": "inline",
1817
"filePath": "",
1918
"arguments": "",
20-
"script": "if (Test-Path \"$(AgentToolsPath)\\Begin.ps1\") {\n \"Begin.ps1 script found. Executing...\"\n cd $(AgentToolsPath)\n & $(AgentToolsPath)\\Begin.ps1\n} else {\n \"Begin.ps1 script does not exist. Moving on...\"\n}",
19+
"script": "if (Test-Path \"$Env:AgentToolsPath\\begin.ps1\") {\n \"$Env:AgentToolsPath\\begin.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\begin.ps1\n} else {\n \"$Env:AgentToolsPath\\begin.ps1 script does not exist. Moving on...\"\n}",
2120
"errorActionPreference": "continue",
2221
"failOnStderr": "false",
2322
"ignoreLASTEXITCODE": "true",
@@ -298,9 +297,8 @@
298297
"enabled": true,
299298
"continueOnError": true,
300299
"alwaysRun": true,
301-
"displayName": "Run AgentTools/End.ps1",
300+
"displayName": "run end.ps1",
302301
"timeoutInMinutes": 0,
303-
"condition": "succeededOrFailed()",
304302
"task": {
305303
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
306304
"versionSpec": "2.*",
@@ -310,7 +308,7 @@
310308
"targetType": "inline",
311309
"filePath": "",
312310
"arguments": "",
313-
"script": "if (Test-Path \"$(AgentToolsPath)\\End.ps1\") {\n \"End.ps1 script found. Executing...\"\n cd $(AgentToolsPath)\n & $(AgentToolsPath)\\End.ps1\n} else {\n \"End.ps1 script does not exist. Moving on...\"\n}",
311+
"script": "if (Test-Path \"$Env:AgentToolsPath\\end.ps1\") {\n \"$Env:AgentToolsPath\\end.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\end.ps1\n} else {\n \"$Env:AgentToolsPath\\end.ps1 script does not exist. Moving on...\"\n}",
314312
"errorActionPreference": "continue",
315313
"failOnStderr": "false",
316314
"ignoreLASTEXITCODE": "true",

buildpipeline/DotNet-CoreFx-Trusted-Windows.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"environment": {},
55
"enabled": true,
66
"continueOnError": true,
7-
"alwaysRun": false,
8-
"displayName": "Run AgentTools/Begin.ps1",
7+
"displayName": "run begin.ps1",
98
"timeoutInMinutes": 0,
10-
"condition": "succeededOrFailed()",
9+
"alwaysRun": true,
1110
"task": {
1211
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
1312
"versionSpec": "2.*",
@@ -17,7 +16,7 @@
1716
"targetType": "inline",
1817
"filePath": "",
1918
"arguments": "",
20-
"script": "if (Test-Path \"$(AgentToolsPath)\\Begin.ps1\") {\n \"Begin.ps1 script found. Executing...\"\n cd $(AgentToolsPath)\n & $(AgentToolsPath)\\Begin.ps1\n} else {\n \"Begin.ps1 script does not exist. Moving on...\"\n}",
19+
"script": "if (Test-Path \"$Env:AgentToolsPath\\begin.ps1\") {\n \"$Env:AgentToolsPath\\begin.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\begin.ps1\n} else {\n \"$Env:AgentToolsPath\\begin.ps1 script does not exist. Moving on...\"\n}",
2120
"errorActionPreference": "continue",
2221
"failOnStderr": "false",
2322
"ignoreLASTEXITCODE": "true",
@@ -349,9 +348,8 @@
349348
"enabled": true,
350349
"continueOnError": true,
351350
"alwaysRun": true,
352-
"displayName": "Run AgentTools/End.ps1",
351+
"displayName": "run end.ps1",
353352
"timeoutInMinutes": 0,
354-
"condition": "succeededOrFailed()",
355353
"task": {
356354
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
357355
"versionSpec": "2.*",
@@ -361,7 +359,7 @@
361359
"targetType": "inline",
362360
"filePath": "",
363361
"arguments": "",
364-
"script": "if (Test-Path \"$(AgentToolsPath)\\End.ps1\") {\n \"End.ps1 script found. Executing...\"\n cd $(AgentToolsPath)\n & $(AgentToolsPath)\\End.ps1\n} else {\n \"End.ps1 script does not exist. Moving on...\"\n}",
362+
"script": "if (Test-Path \"$Env:AgentToolsPath\\end.ps1\") {\n \"$Env:AgentToolsPath\\end.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\end.ps1\n} else {\n \"$Env:AgentToolsPath\\end.ps1 script does not exist. Moving on...\"\n}",
365363
"errorActionPreference": "continue",
366364
"failOnStderr": "false",
367365
"ignoreLASTEXITCODE": "true",

buildpipeline/DotNet-Trusted-Publish-Symbols.json

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
{
22
"build": [
3+
{
4+
"environment": {},
5+
"enabled": true,
6+
"continueOnError": true,
7+
"displayName": "run begin.ps1",
8+
"timeoutInMinutes": 0,
9+
"alwaysRun": true,
10+
"task": {
11+
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
12+
"versionSpec": "2.*",
13+
"definitionType": "task"
14+
},
15+
"inputs": {
16+
"targetType": "inline",
17+
"filePath": "",
18+
"arguments": "",
19+
"script": "if (Test-Path \"$Env:AgentToolsPath\\begin.ps1\") {\n \"$Env:AgentToolsPath\\begin.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\begin.ps1\n} else {\n \"$Env:AgentToolsPath\\begin.ps1 script does not exist. Moving on...\"\n}",
20+
"errorActionPreference": "continue",
21+
"failOnStderr": "false",
22+
"ignoreLASTEXITCODE": "true",
23+
"workingDirectory": ""
24+
}
25+
},
326
{
427
"enabled": true,
528
"continueOnError": false,
@@ -119,6 +142,29 @@
119142
"failOnStandardError": "false"
120143
}
121144
},
145+
{
146+
"environment": {},
147+
"enabled": true,
148+
"continueOnError": true,
149+
"alwaysRun": true,
150+
"displayName": "run end.ps1",
151+
"timeoutInMinutes": 0,
152+
"task": {
153+
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
154+
"versionSpec": "2.*",
155+
"definitionType": "task"
156+
},
157+
"inputs": {
158+
"targetType": "inline",
159+
"filePath": "",
160+
"arguments": "",
161+
"script": "if (Test-Path \"$Env:AgentToolsPath\\end.ps1\") {\n \"$Env:AgentToolsPath\\end.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\end.ps1\n} else {\n \"$Env:AgentToolsPath\\end.ps1 script does not exist. Moving on...\"\n}",
162+
"errorActionPreference": "continue",
163+
"failOnStderr": "false",
164+
"ignoreLASTEXITCODE": "true",
165+
"workingDirectory": ""
166+
}
167+
}
122168
],
123169
"options": [
124170
{
@@ -254,7 +300,7 @@
254300
},
255301
"PB_SymbolExpirationInDays": {
256302
"value": "30"
257-
},
303+
}
258304
},
259305
"retentionRules": [
260306
{

buildpipeline/DotNet-Trusted-Publish.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
{
22
"build": [
3+
{
4+
"environment": {},
5+
"enabled": true,
6+
"continueOnError": true,
7+
"displayName": "run begin.ps1",
8+
"timeoutInMinutes": 0,
9+
"alwaysRun": true,
10+
"task": {
11+
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
12+
"versionSpec": "2.*",
13+
"definitionType": "task"
14+
},
15+
"inputs": {
16+
"targetType": "inline",
17+
"filePath": "",
18+
"arguments": "",
19+
"script": "if (Test-Path \"$Env:AgentToolsPath\\begin.ps1\") {\n \"$Env:AgentToolsPath\\begin.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\begin.ps1\n} else {\n \"$Env:AgentToolsPath\\begin.ps1 script does not exist. Moving on...\"\n}",
20+
"errorActionPreference": "continue",
21+
"failOnStderr": "false",
22+
"ignoreLASTEXITCODE": "true",
23+
"workingDirectory": ""
24+
}
25+
},
326
{
427
"environment": {},
528
"enabled": true,
@@ -267,6 +290,29 @@
267290
"definitionType": "task"
268291
},
269292
"inputs": {}
293+
},
294+
{
295+
"environment": {},
296+
"enabled": true,
297+
"continueOnError": true,
298+
"alwaysRun": true,
299+
"displayName": "run end.ps1",
300+
"timeoutInMinutes": 0,
301+
"task": {
302+
"id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
303+
"versionSpec": "2.*",
304+
"definitionType": "task"
305+
},
306+
"inputs": {
307+
"targetType": "inline",
308+
"filePath": "",
309+
"arguments": "",
310+
"script": "if (Test-Path \"$Env:AgentToolsPath\\end.ps1\") {\n \"$Env:AgentToolsPath\\end.ps1 script found. Executing...\"\n & $Env:AgentToolsPath\\end.ps1\n} else {\n \"$Env:AgentToolsPath\\end.ps1 script does not exist. Moving on...\"\n}",
311+
"errorActionPreference": "continue",
312+
"failOnStderr": "false",
313+
"ignoreLASTEXITCODE": "true",
314+
"workingDirectory": ""
315+
}
270316
}
271317
],
272318
"options": [

0 commit comments

Comments
 (0)