What happens if the 'summary.html' file is missing after the build?
medium
A. The build will fail due to missing report file
B. The build will succeed and no report will be shown
C. Jenkins will create an empty report automatically
D. The build will pause and wait for the file
Solution
Step 1: Understand the allowMissing option
allowMissing: true means Jenkins will not fail the build if the report file is missing.
Step 2: Predict behavior when file is missing
Since allowMissing is true, the build succeeds but no report is shown.
Final Answer:
The build will succeed and no report will be shown -> Option B
Quick Check:
allowMissing true = no failure if missing [OK]
Hint: allowMissing true lets build pass without report [OK]
Common Mistakes:
Assuming build fails when allowMissing is true
Thinking Jenkins creates missing files
Believing build pauses for missing files
4. You configured publishHTML in your Jenkins pipeline but the HTML report does not appear in the build results. Which of these is the most likely cause?
medium
A. The Jenkins server needs a restart
B. The publishHTML step is missing the allowMissing option
C. The reportDir path is incorrect or does not contain the report files
D. The reportName is too long
Solution
Step 1: Check common reasons for missing HTML reports
If the reportDir path is wrong or empty, Jenkins cannot find the report files to display.
Step 2: Evaluate other options
allowMissing missing does not prevent report display if files exist; reportName length and server restart are unrelated.
Final Answer:
The reportDir path is incorrect or does not contain the report files -> Option C
Quick Check:
Wrong reportDir = no report shown [OK]
Hint: Verify reportDir path and files exist [OK]
Common Mistakes:
Ignoring reportDir correctness
Thinking allowMissing affects report visibility
Restarting Jenkins unnecessarily
5. You want Jenkins to keep all HTML reports from every build and always link to the latest report. Which configuration achieves this?