Skip to content

Commit e2c33e4

Browse files
authored
Merge pull request #175 from jagilber/development
Development feature build with localPath functionality
2 parents 0211f6e + 72da758 commit e2c33e4

37 files changed

+7701
-1482
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# fix incorrect Roff programming language tag in github repo
2+
*.man -linguist-language
3+
#*.man linguist-language=xml

.vscode/launch.json

+70-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,74 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": ".NET 8 LTS Launch with Args (console)",
8+
"name": ".NET462 Launch with Args (console)",
9+
"type": "clr",
10+
"request": "launch",
11+
"requireExactSource": false,
12+
"program": "${workspaceFolder}/src/bin/Debug/net462/CollectSFData.exe",
13+
"args": [
14+
//"${input:args}"
15+
"-type",
16+
"trace",
17+
"-krt",
18+
"1",
19+
"-t",
20+
"1",
21+
// "-l",
22+
// "1"
23+
],
24+
"cwd": "${workspaceFolder}/src/bin/Debug/net8.0",
25+
"stopAtEntry": false,
26+
"console": "internalConsole",
27+
},
28+
{
29+
"name": ".NET48 Launch with Args (console)",
30+
"type": "clr",
31+
"request": "launch",
32+
"requireExactSource": false,
33+
"program": "${workspaceFolder}/src/bin/Debug/net48/CollectSFData.exe",
34+
"args": [
35+
//"${input:args}"
36+
"-type",
37+
"trace",
38+
"-krt",
39+
"1",
40+
"-t",
41+
"1",
42+
// "-l",
43+
// "1"
44+
],
45+
"cwd": "${workspaceFolder}/src/bin/Debug/net8.0",
46+
"stopAtEntry": false,
47+
"console": "internalConsole",
48+
},
49+
{
50+
"name": ".NET 8 Launch with Args (console)",
51+
"type": "coreclr",
52+
"request": "launch",
53+
"requireExactSource": false,
54+
//"preLaunchTask": "build",
55+
"program": "${workspaceFolder}/src/bin/Debug/net8.0/CollectSFData.dll",
56+
"args": [
57+
//"${input:args}"
58+
"-type",
59+
"trace",
60+
"-krt",
61+
"1",
62+
"-t",
63+
"1",
64+
// "-l",
65+
// "1"
66+
],
67+
"cwd": "${workspaceFolder}/src/bin/Debug/net8.0",
68+
"stopAtEntry": false,
69+
"console": "internalConsole",
70+
},
71+
{
72+
"name": ".NET 8 Build / Launch with Args (console)",
973
"type": "coreclr",
1074
"request": "launch",
75+
"requireExactSource": false,
1176
"preLaunchTask": "build",
1277
"program": "${workspaceFolder}/src/bin/Debug/net8.0/CollectSFData.dll",
1378
"args": [
@@ -22,9 +87,10 @@
2287
"console": "internalConsole",
2388
},
2489
{
25-
"name": ".NET 6 LTS Launch with Args (console)",
90+
"name": ".NET 6 Build / Launch with Args (console)",
2691
"type": "coreclr",
2792
"request": "launch",
93+
"requireExactSource": false,
2894
"preLaunchTask": "build",
2995
"program": "${workspaceFolder}/src/bin/Debug/net6.0/CollectSFData.dll",
3096
"args": [
@@ -41,6 +107,7 @@
41107
"type": "coreclr",
42108
"request": "launch",
43109
"preLaunchTask": "build",
110+
"requireExactSource": false,
44111
"program": "${workspaceFolder}/src/bin/Debug/net6.0/CollectSFData.dll",
45112
"args": [],
46113
"cwd": "${workspaceFolder}/src/bin/Debug/net6.0",
@@ -52,6 +119,7 @@
52119
"type": "coreclr",
53120
"request": "launch",
54121
"preLaunchTask": "build",
122+
"requireExactSource": false,
55123
"program": "${workspaceFolder}/src/bin/Debug/net8.0/CollectSFData.dll",
56124
"args": [],
57125
"cwd": "${workspaceFolder}/src/bin/Debug/net8.0",

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"dotnet-test-explorer.testProjectPath": "**/*Test.csproj",
33
"dotnet.defaultSolution": "src\\CollectSFData.sln",
4-
"accessibility.signals.sounds.volume": 0
4+
"accessibility.signalOptions": {
5+
"volume": 0
6+
}
57
}

CHANGELOG.md

+29-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
11
# Change log
22

3+
## 06/03/2024
4+
5+
- add configuration option to specify / disable utility update check in days 'CheckForUpdates' #25
6+
- default 30 days
7+
- 0 to disable
8+
- remove unused RelogBlg function #26
9+
- add collectsfdata.options.json to all lib\net* frameworks #24
10+
- script updates for kusto myfreecluster
11+
12+
## 04/29/2024
13+
14+
- remove unused Azure.Security.KeyVault.Certificates from nuget.config
15+
- set System.Memory explicity version 4.5.5 in nuget.config
16+
- bump Microsoft.Identity.Client from 4.56.0 to 4.60.1 in nuget.config due to security vulnerability
17+
- bump Azure.Identity from 1.10.2 to 1.11.0 in nuget.config due to security vulnerability
18+
- add Service Fabric 10.1 manifests
19+
20+
## 03/24/2024
21+
22+
- add sign stage
23+
- build
24+
- sign
25+
- release nupkg to internal feed if master
26+
327
## 03/20/2024
428

529
- modify azure pipelines for ado
6-
- add stages and jobs for build and release
7-
- add signing
8-
- add publish
9-
- set publish on merge to master
30+
- add stages and jobs for build and release
31+
- add signing
32+
- add publish
33+
- set publish on merge to master
34+
- only add net framework / core versions to zip for release
1035

1136
## 03/16/2024
1237

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ Options:
140140
type collectsfdata.exe -save default.json to create a default file.
141141
if collectsfdata.options.json exists, it will be used for configuration.
142142
-cf|--containerFilter [string] string / regex to filter container names
143+
-dp|--databasePersistence [bool] default false to create a volatile database. a value of true will persist
144+
the database on a given path in your container.
145+
-dpp|--databasePersistencePath [string] path where you want your database to be persisted in for local ingestion.
146+
path must be in the format: "@'C:\\kustodata\\MyDatabaseName\\md',@'C:\\kustodata\\MyDatabaseName\\data'"
143147
-dc|--deleteCache [bool] delete downloaded blobs from local disk at end of execution.
144148
-to|--stop [DateTime] end time range to collect data to. default is now.
145149
example: "03/22/2023 18:24:01 -04:00"
@@ -170,6 +174,7 @@ Options:
170174
service fabric 6.5+ dtr files are compliant.
171175
-kim|--kustoUseIngestMessage [bool] for kusto ingestion message tracking.
172176
-l|--list [bool] list files instead of downloading
177+
-lp|--localPath [string] path to original files and indicates local ingestion e.g. 'C:\Perfcounters\Output'
173178
-lac|--logAnalyticsCreate [bool] create new log analytics workspace.
174179
requires LogAnalyticsWorkspaceName, AzureResourceGroup,
175180
AzureResourceGroupLocation, and AzureSubscriptionId

azure-pipelines-dev.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ variables:
1616
project_feed: Tools/CollectServiceFabricData
1717
build_configuration: debug
1818
system.debug: true
19-
publish_release: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
19+
publish_release: true #$[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
2020
project_root: .\src
2121
start_time: $[format('{0}-{1:yyyy}{1:MM}{1:dd}-{1:HH}{1:mm}{1:ss}', variables['project_name'], pipeline.startTime)]
2222
artifacts_drive: Z
@@ -69,6 +69,8 @@ stages:
6969
inputs:
7070
targetType: 'inline'
7171
script: |
72+
write-host "dotnet list `"$env:project_root\$env:project_name\$env:project_name.csproj`" package --include-transitive"
73+
dotnet list "$env:project_root\$env:project_name\$env:project_name.csproj" package --include-transitive
7274
write-host "dotnet build `"$env:project_root\$env:project_name\$env:project_name.csproj`" -v detailed -c $env:build_configuration"
7375
dotnet build "$env:project_root\$env:project_name\$env:project_name.csproj" -v detailed -c $env:build_configuration
7476
errorActionPreference: 'continue'
@@ -234,11 +236,10 @@ stages:
234236
script: |
235237
$nupkg = @(get-childItem -recurse "$($env:release_path)\*.nupkg")[0].FullName
236238
$nupkgZip = "$nupkg.zip"
237-
$nupkgUnsigned = "$nupkg".replace(".nupkg", ".unsigned.nupkg")
238239
write-host "nupkg=$nupkg"
239240
$nupkgDir = "$($env:release_stage_path)"
240241
del "$nupkgDir\CodeSignSummary*.md" -force
241-
ren $nupkg $nuPkgUnsigned
242+
del $nupkg -force
242243
del $nupkgZip -force
243244
write-host "compress-archive -path $nupkgDir\* -destinationPath $nupkgZip -force"
244245
compress-archive -path $nupkgDir\* -destinationPath $nupkgZip -force
@@ -281,11 +282,11 @@ stages:
281282
VerboseLogin: false
282283

283284
- task: PowerShell@2
284-
displayName: 'create zip with signed files'
285+
displayName: 'create zip with signed .net version files'
285286
inputs:
286287
targetType: 'inline'
287288
script: |
288-
$source = "$($env:release_path)\\*"
289+
$source = "$($env:release_path)\\net*"
289290
$destination = "$($env:release_stage_path)\\$($env:project_name).zip"
290291
write-host "compress-archive -path $source -destinationPath $destination -force"
291292
compress-archive -path $source -destinationPath $destination -force

azure-pipelines.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pool:
1414
variables:
1515
project_name: CollectSFData
1616
esrp_signing_connection: 'collectsfdata esrp signing connection'
17-
project_feed: Tools/CollectServiceFabricData
17+
project_feed: Tools/CollectServiceFabricData_Public
1818
build_configuration: release
1919
system.debug: false
2020
publish_release: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
@@ -70,6 +70,8 @@ stages:
7070
inputs:
7171
targetType: 'inline'
7272
script: |
73+
write-host "dotnet list `"$env:project_root\$env:project_name\$env:project_name.csproj`" package --include-transitive"
74+
dotnet list "$env:project_root\$env:project_name\$env:project_name.csproj" package --include-transitive
7375
write-host "dotnet build `"$env:project_root\$env:project_name\$env:project_name.csproj`" -v detailed -c $env:build_configuration"
7476
dotnet build "$env:project_root\$env:project_name\$env:project_name.csproj" -v detailed -c $env:build_configuration
7577
errorActionPreference: 'continue'
@@ -235,11 +237,10 @@ stages:
235237
script: |
236238
$nupkg = @(get-childItem -recurse "$($env:release_path)\*.nupkg")[0].FullName
237239
$nupkgZip = "$nupkg.zip"
238-
$nupkgUnsigned = "$nupkg".replace(".nupkg", ".unsigned.nupkg")
239240
write-host "nupkg=$nupkg"
240241
$nupkgDir = "$($env:release_stage_path)"
241242
del "$nupkgDir\CodeSignSummary*.md" -force
242-
ren $nupkg $nuPkgUnsigned
243+
del $nupkg -force
243244
del $nupkgZip -force
244245
write-host "compress-archive -path $nupkgDir\* -destinationPath $nupkgZip -force"
245246
compress-archive -path $nupkgDir\* -destinationPath $nupkgZip -force
@@ -282,11 +283,11 @@ stages:
282283
VerboseLogin: false
283284

284285
- task: PowerShell@2
285-
displayName: 'create zip with signed files'
286+
displayName: 'create zip with signed .net version files'
286287
inputs:
287288
targetType: 'inline'
288289
script: |
289-
$source = "$($env:release_path)\\*"
290+
$source = "$($env:release_path)\\net*"
290291
$destination = "$($env:release_stage_path)\\$($env:project_name).zip"
291292
write-host "compress-archive -path $source -destinationPath $destination -force"
292293
compress-archive -path $source -destinationPath $destination -force

configurationFiles/collectsfdata.options.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"AzureResourceGroup": null,
77
"AzureResourceGroupLocation": null,
88
"AzureSubscriptionId": null,
9-
"AzureTenantId": null,
9+
"AzureTenantId": "common",
1010
"CacheLocation": null,
11+
"CheckForUpdates": 30,
1112
"ContainerFilter": null,
1213
"DeleteCache": false,
1314
"EndTimeStamp": null,

configurationFiles/collectsfdata.schema.json

+61-1
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@
103103
"type": "string",
104104
"title": "AzureTenantId",
105105
"description": "azure tenant id guid for certain non-default azure operations",
106-
"default": null,
106+
"default": "common",
107107
"examples": [
108+
"common",
108109
null,
109110
"123456578-1234-1234-1234-123456789012"
110111
],
@@ -122,6 +123,30 @@
122123
],
123124
"pattern": "^(.+)$"
124125
},
126+
"CheckForUpdates": {
127+
"$id": "#/properties/CheckForUpdates",
128+
"type": "integer",
129+
"title": "CheckForUpdates",
130+
"description": "0-disabled, else check for new utility updates every n days",
131+
"default": 30,
132+
"enum": [
133+
0,
134+
1,
135+
2,
136+
3,
137+
4,
138+
5
139+
],
140+
"examples": [
141+
0,
142+
1,
143+
2,
144+
3,
145+
4,
146+
5
147+
],
148+
"pattern": "^(\\d{0,3})$"
149+
},
125150
"ContainerFilter": {
126151
"$id": "#/properties/ContainerFilter",
127152
"type": "string",
@@ -134,6 +159,29 @@
134159
],
135160
"pattern": "^(.+)$"
136161
},
162+
"DatabasePersistence": {
163+
"$id": "#/properties/DatabasePersistence",
164+
"type": "boolean",
165+
"title": "DatabasePersistence",
166+
"description": "true to create a local persistent database.",
167+
"default": false,
168+
"examples": [
169+
false,
170+
true
171+
]
172+
},
173+
"DatabasePersistencePath": {
174+
"$id": "#/properties/DatabasePersistencePath",
175+
"type": "string",
176+
"title": "DatabasePersistencePath",
177+
"description": "local device database path if a local kusto url is provided.",
178+
"default": null,
179+
"examples": [
180+
null,
181+
"@'C:\\kustodata\\MyDatabaseName\\md',@'C:\\kustodata\\MyDatabaseName\\data'"
182+
],
183+
"pattern": "^(.+)$"
184+
},
137185
"DeleteCache": {
138186
"$id": "#/properties/DeleteCache",
139187
"type": "boolean",
@@ -320,6 +368,18 @@
320368
true
321369
]
322370
},
371+
"LocalPath": {
372+
"$id": "#/properties/LocalPath",
373+
"type": "string",
374+
"title": "LocalPath",
375+
"description": "local device path containing source trace files for ingestion.",
376+
"default": null,
377+
"examples": [
378+
null,
379+
"c:\\kustodata\\dbs\\"
380+
],
381+
"pattern": "^(.+)$"
382+
},
323383
"LogAnalyticsCreate": {
324384
"$id": "#/properties/LogAnalyticsCreate",
325385
"type": "boolean",

0 commit comments

Comments
 (0)