Skip to content

Commit 2eb6549

Browse files
authored
Merge pull request #142 from pjanotti/investigate-issue-with-eventcreate-on-ci
Instrument action to help investigation
2 parents 9204a06 + 958a422 commit 2eb6549

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build-and-test-windows.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
merge_group:
88
types: [checks_requested]
99
pull_request:
10+
workflow_dispatch: # Just for testing purposes
1011

1112
concurrency:
1213
group: ${{ github.workflow }}-${{ github.ref_name }}
@@ -78,6 +79,13 @@ jobs:
7879
run: |
7980
New-Service -Name "otelcorecol" -StartupType "Manual" -BinaryPathName "${PWD}\bin\otelcorecol_windows_amd64 --config ${PWD}\examples\local\otel-config.yaml"
8081
eventcreate.exe /t information /id 1 /l application /d "Creating event provider for 'otelcorecol'" /so otelcorecol
82+
if ($LastExitCode -eq 0) { exit 0 }
83+
Write-Host "Hit issue #12422 collecting info for investigation"
84+
Get-Service -Name EventLog
85+
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()); `
86+
Write-Host "Running as admin: $($currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))"
87+
Start-Sleep -Seconds 10
88+
eventcreate.exe /t information /id 1 /l application /d "Creating event provider for 'otelcorecol'" /so otelcorecol
8189
8290
- name: Test otelcorecol service
8391
working-directory: ${{ github.workspace }}/otelcol

0 commit comments

Comments
 (0)