9494
9595
9696 # -------------------------------------------------------
97- # Step 3 : Start Splunk container
97+ # Step 4 : Start Splunk container
9898 # -------------------------------------------------------
9999 - name : Start Splunk container
100100 run : |
@@ -114,7 +114,7 @@ jobs:
114114 echo "Container started. Waiting for Splunk to become healthy..."
115115
116116 # -------------------------------------------------------
117- # Step 4 : Wait for Splunk to be ready
117+ # Step 5 : Wait for Splunk to be ready
118118 # -------------------------------------------------------
119119 - name : Wait for Splunk ${{ matrix.splunk_version }} to be ready
120120 run : |
@@ -155,7 +155,7 @@ jobs:
155155 fi
156156
157157 # -------------------------------------------------------
158- # Step 5 : Deploy the app into Splunk
158+ # Step 6 : Deploy the app into Splunk
159159 # -------------------------------------------------------
160160 - name : Deploy ${{ env.APP_NAME }} app to Splunk
161161 run : |
@@ -166,6 +166,16 @@ jobs:
166166 docker cp app_package/${{ env.APP_NAME }} \
167167 splunk:${{ env.APP_DEPLOY_PATH }}/${{ env.APP_NAME }}
168168
169+ # Create local directory and add configuration file
170+ echo "=== Creating local configuration ==="
171+ docker exec --user root splunk mkdir -p \
172+ ${{ env.APP_DEPLOY_PATH }}/${{ env.APP_NAME }}/local
173+
174+ docker exec --user root splunk bash -c 'cat > ${{ env.APP_DEPLOY_PATH }}/${{ env.APP_NAME }}/local/splunkconf-backup.conf << EOF
175+ [settings]
176+ DEBUG=1
177+ EOF'
178+
169179 echo "=== Fixing app permission, giving files to Splunk ==="
170180 # Fix ownership inside the container
171181 # run as root to be allowed to chown
@@ -178,7 +188,7 @@ jobs:
178188 echo "App deployed successfully."
179189
180190 # -------------------------------------------------------
181- # Step 6 : Restart Splunk to load the app
191+ # Step 7 : Restart Splunk to load the app
182192 # -------------------------------------------------------
183193 - name : Restart Splunk
184194 run : |
@@ -224,7 +234,7 @@ jobs:
224234 fi
225235
226236 # -------------------------------------------------------
227- # Step 7 : Verify app is loaded in Splunk
237+ # Step 8 : Verify app is loaded in Splunk
228238 # -------------------------------------------------------
229239 - name : Verify app is loaded
230240 run : |
@@ -243,7 +253,7 @@ jobs:
243253 echo "REST API check for app: HTTP ${HTTP_CODE}"
244254
245255 # -------------------------------------------------------
246- # Step 8 : Wait for file generation
256+ # Step 9 : Wait for file generation
247257 # -------------------------------------------------------
248258 - name : Wait for output files to be generated
249259 run : |
@@ -315,7 +325,7 @@ jobs:
315325 fi
316326
317327 # -------------------------------------------------------
318- # Step 9 : Check for file creation in the output directory
328+ # Step 10 : Check for file creation in the output directory
319329 # -------------------------------------------------------
320330 - name : Verify files were created
321331 run : |
@@ -346,7 +356,7 @@ jobs:
346356 echo "SUCCESS: ${FILE_COUNT} backup file(s) found."
347357
348358 # -------------------------------------------------------
349- # Step 10 : Download (copy) the generated tar files
359+ # Step 11 : Download (copy) the generated tar files
350360 # -------------------------------------------------------
351361 - name : Download generated backup files from container
352362 run : |
@@ -367,7 +377,7 @@ jobs:
367377 ls -la ./test_output/
368378
369379 # -------------------------------------------------------
370- # Step 11 : Verify tar file contents
380+ # Step 12 : Verify tar file contents
371381 # -------------------------------------------------------
372382 - name : Verify tar file contents
373383 run : |
@@ -513,7 +523,7 @@ jobs:
513523 fi
514524
515525 # -------------------------------------------------------
516- # Step 12 : Upload test artifacts (for debugging)
526+ # Step 13 : Upload test artifacts (for debugging)
517527 # -------------------------------------------------------
518528 - name : Upload test artifacts
519529 if : always()
@@ -524,7 +534,7 @@ jobs:
524534 retention-days : 7
525535
526536 # -------------------------------------------------------
527- # Step 13 : Collect Splunk logs on failure
537+ # Step 14 : Collect Splunk logs on failure
528538 # -------------------------------------------------------
529539 - name : Collect Splunk logs on failure
530540 if : failure()
@@ -554,7 +564,7 @@ jobs:
554564 retention-days : 7
555565
556566 # -------------------------------------------------------
557- # Step 14 : Cleanup
567+ # Step 15 : Cleanup
558568 # -------------------------------------------------------
559569 - name : Cleanup Splunk container
560570 if : always()
0 commit comments