@@ -91,39 +91,10 @@ jobs:
91
91
name : agent-bundle-windows
92
92
path : ./dist/agent-bundle_windows_amd64.zip
93
93
94
- msi-custom-actions :
95
- runs-on : windows-2022
96
- steps :
97
- - name : Check out the codebase.
98
- uses : actions/checkout@v4
99
-
100
- - name : Build Custom Actions
101
- working-directory : internal/buildscripts/packaging/msi/SplunkCustomActions
102
- run : |
103
- dotnet publish ./SplunkCustomActions.csproj -c Release -o ./bin/Release
104
-
105
- - name : Package Custom Actions
106
- run : |
107
- $WixPath = "${Env:ProgramFiles(x86)}\WiX Toolset v3.14"
108
- $sfxcaDll = "${WixPath}\SDK\x64\sfxca.dll"
109
- $Env:PATH = "${WixPath}\SDK;" + $Env:PATH
110
- $customActionDir = "${PWD}\internal\buildscripts\packaging\msi\SplunkCustomActions"
111
- $customActionBinDir = "${customActionDir}\bin\Release"
112
- MakeSfxCA.exe "${PWD}\dist\SplunkCustomActions.CA.dll" `
113
- "${sfxcaDll}" `
114
- "${customActionBinDir}\SplunkCustomActions.dll" `
115
- "${customActionBinDir}\Microsoft.Deployment.WindowsInstaller.dll" `
116
- "${customActionDir}\CustomAction.config"
117
-
118
- - uses : actions/upload-artifact@v4
119
- with :
120
- name : msi-custom-actions
121
- path : ./dist/SplunkCustomActions.CA.dll
122
-
123
94
msi-build :
124
95
# Use 20.04.5 until https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16450 is resolved
125
96
runs-on : ubuntu-20.04
126
- needs : [cross-compile, agent-bundle-windows, msi-custom-actions ]
97
+ needs : [cross-compile, agent-bundle-windows]
127
98
steps :
128
99
- name : Check out the codebase.
129
100
uses : actions/checkout@v4
@@ -142,18 +113,11 @@ jobs:
142
113
go-version : ${{ env.GO_VERSION }}
143
114
cache-dependency-path : ' **/go.sum'
144
115
145
- - name : Downloading agent-bundle-windows
146
- uses : actions/download-artifact@v4
116
+ - uses : actions/download-artifact@v4
147
117
with :
148
118
name : agent-bundle-windows
149
119
path : ./dist
150
120
151
- - name : Downloading msi-custom-actions
152
- uses : actions/download-artifact@v4
153
- with :
154
- name : msi-custom-actions
155
- path : ./internal/buildscripts/packaging/msi/SplunkCustomActions/bin/Release
156
-
157
121
- name : Build MSI
158
122
run : |
159
123
mkdir -p dist
@@ -222,24 +186,7 @@ jobs:
222
186
strategy :
223
187
matrix :
224
188
OS : [ "windows-2022" ]
225
- install-properties :
226
-
227
- - install : " SPLUNK_ACCESS_TOKEN=fakeToken"
228
- expected : " -mode agent -access_token fakeToken -realm us0 -memory $null -with_fluentd false"
229
-
230
- - install : " SPLUNK_SETUP_COLLECTOR_MODE=gateway SPLUNK_ACCESS_TOKEN=testing123"
231
- expected : " -mode gateway -access_token testing123 -realm us0 -memory $null -with_fluentd false"
232
-
233
- - install : " SPLUNK_REALM=myrealm SPLUNK_ACCESS_TOKEN=testing"
234
- expected : " -mode agent -access_token testing -realm myrealm -memory $null -with_fluentd false"
235
-
236
- - install : " SPLUNK_INGEST_URL=https://fake.ingest.url SPLUNK_ACCESS_TOKEN=testing"
237
- expected : " -mode agent -realm us0 -access_token testing -ingest_url \" https://fake.ingest.url\" -memory $null -with_fluentd false"
238
-
239
189
steps :
240
- - name : Check out the codebase.
241
- uses : actions/checkout@v4
242
-
243
190
- name : Downloading msi build
244
191
uses : actions/download-artifact@v4
245
192
with :
@@ -252,7 +199,7 @@ jobs:
252
199
$msi_path = Resolve-Path .\dist\splunk-otel-collector*.msi
253
200
Test-Path $msi_path
254
201
Write-Host "Installing $msi_path ..."
255
- $process = Start-Process -Wait -PassThru msiexec "/i `"$msi_path`" /qn /l*v msi-install.log ${{ matrix.install-properties.install }} "
202
+ $process = Start-Process -Wait -PassThru msiexec "/i `"$msi_path`" /qn /l*v msi-install.log"
256
203
if ($process.ExitCode -ne 0) {
257
204
throw "MSI installation failed with exit code $($process.ExitCode)"
258
205
}
@@ -261,15 +208,21 @@ jobs:
261
208
if : ${{ failure() }}
262
209
run : Get-Content msi-install.log
263
210
211
+ - name : Set environment variables required to start the collector service
212
+ run : |
213
+ $ErrorActionPreference = 'Stop'
214
+ [Environment]::SetEnvironmentVariable("SPLUNK_ACCESS_TOKEN", "123456e", "Machine")
215
+ [Environment]::SetEnvironmentVariable("SPLUNK_API_URL", "https://non.existent.for.tests", "Machine")
216
+ [Environment]::SetEnvironmentVariable("SPLUNK_HEC_TOKEN", "098765e", "Machine")
217
+ [Environment]::SetEnvironmentVariable("SPLUNK_HEC_URL", "https://non.existent.for.tests/v1/log", "Machine")
218
+ [Environment]::SetEnvironmentVariable("SPLUNK_INGEST_URL", "https://non.existent.for.tests", "Machine")
219
+ [Environment]::SetEnvironmentVariable("SPLUNK_TRACE_URL", "https://non.existent.for.tests/v2/trace", "Machine")
220
+ [Environment]::SetEnvironmentVariable("SPLUNK_BUNDLE_DIR", "%ProgramFiles%\Splunk\OpenTelemetry", "Machine")
221
+
264
222
- name : Start the collector service
265
223
run :
266
224
Start-Service splunk-otel-collector
267
225
268
- - name : Check registry expectations
269
- run : |
270
- $ErrorActionPreference = 'Stop'
271
- & ${{ github.workspace }}\.github\workflows\scripts\win-test-services.ps1 ${{ matrix.install-properties.expected }}
272
-
273
226
- name : Stop the collector service
274
227
run :
275
228
Stop-Service splunk-otel-collector
0 commit comments