Artifact fingerprinting is a process Jenkins uses to track files (artifacts) across builds by creating a unique identifier (fingerprint) for each file. This helps trace where files are used or produced.
Click to reveal answer
beginner
How does Jenkins create a fingerprint for an artifact?
Jenkins creates a fingerprint by calculating a hash (like MD5) of the artifact file's content. This hash uniquely identifies the file regardless of its name or location.
Click to reveal answer
intermediate
Why is artifact fingerprinting useful in a CI/CD pipeline?
It helps track which builds produced or used a specific artifact, enabling traceability, debugging, and ensuring the right versions of files are deployed.
Click to reveal answer
beginner
How do you enable artifact fingerprinting in a Jenkins job?
In the Jenkins job configuration, under 'Post-build Actions', select 'Record fingerprints of files to track' and specify the files or patterns to fingerprint.
Click to reveal answer
intermediate
What information can you find from a fingerprint record in Jenkins?
You can see which builds produced or used the artifact, the file's hash, and its history across jobs, helping to understand artifact flow.
Click to reveal answer
What does Jenkins use to uniquely identify an artifact file?
AThe file size
BThe file name only
CA hash of the file content
DThe build number
✗ Incorrect
Jenkins uses a hash (like MD5) of the file content to create a unique fingerprint.
Where do you configure artifact fingerprinting in a Jenkins job?
APost-build Actions
BBuild Triggers
CSource Code Management
DBuild Environment
✗ Incorrect
Artifact fingerprinting is set up in the Post-build Actions section of the job configuration.
What is a main benefit of artifact fingerprinting?
ASpeeding up build time
BTracking artifact usage across builds
CCompressing artifacts
DChanging artifact names automatically
✗ Incorrect
Fingerprinting helps track where artifacts are produced and used across builds.
Which of these is NOT true about artifact fingerprints?
AThey depend on the file's location on disk
BThey are based on file content
CThey help trace artifact history
DThey are stored in Jenkins for tracking
✗ Incorrect
Fingerprints depend on file content, not location.
If two files have the same fingerprint, what does it mean?
AThey are stored in the same folder
BThey have the same file name
CThey were created in the same build
DThey have identical content
✗ Incorrect
Same fingerprint means the files have identical content.
Explain how artifact fingerprinting helps in tracking files across Jenkins builds.
Think about how Jenkins knows which build created or used a file.
You got /4 concepts.
Describe the steps to enable artifact fingerprinting in a Jenkins job.
Where in the job settings do you add fingerprinting?
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of artifact fingerprinting in Jenkins?
easy
A. To uniquely track files across different builds
What does the fingerprint 'output.txt' step do here?
medium
A. Deletes output.txt after the build
B. Creates a unique hash for output.txt to track it across builds
C. Copies output.txt to the workspace
D. Uploads output.txt to a remote server
Solution
Step 1: Analyze the pipeline snippet
The pipeline creates a file output.txt and then fingerprints it.
Step 2: Understand fingerprint step effect
The fingerprint step creates a unique hash for the file to track it across builds, not deleting or copying it.
Final Answer:
Creates a unique hash for output.txt to track it across builds -> Option B
Quick Check:
Fingerprint = unique hash tracking [OK]
Hint: Fingerprint creates unique hash for file tracking [OK]
Common Mistakes:
Thinking fingerprint deletes files
Assuming it copies files
Confusing fingerprint with upload
4. You added fingerprint 'app.jar' in your Jenkins pipeline, but fingerprints are not generated. What is a likely cause?
medium
A. You must archive artifacts before fingerprinting
B. Fingerprinting requires a separate plugin installation
C. The file path 'app.jar' is incorrect or file does not exist
D. Fingerprinting only works on text files
Solution
Step 1: Check file existence for fingerprinting
Fingerprinting requires the file to exist at the specified path during the build.
Step 2: Identify common causes for no fingerprints
If the file path is wrong or file missing, fingerprinting won't generate fingerprints.
Final Answer:
The file path 'app.jar' is incorrect or file does not exist -> Option C
Quick Check:
File must exist for fingerprinting [OK]
Hint: Ensure file exists at path before fingerprinting [OK]
Common Mistakes:
Assuming fingerprint needs extra plugin
Thinking archiveArtifacts is mandatory before fingerprint
Believing fingerprint only works on text files
5. In a Jenkins pipeline, you want to track multiple artifacts and find all builds that used them. Which approach correctly uses artifact fingerprinting for this?
hard
A. Use fingerprint '**/*.jar' after building all jar files
B. Archive artifacts first, then fingerprint only one file manually
C. Use stash for all files and fingerprint none
D. Fingerprint files only in the first build, skip others
Solution
Step 1: Understand tracking multiple artifacts
To track multiple files, fingerprinting should be applied to all relevant files, e.g., using a pattern.
Step 2: Evaluate options for multiple files
Using fingerprint '**/*.jar' fingerprints all jar files, enabling tracking across builds.
Final Answer:
Use fingerprint '**/*.jar' after building all jar files -> Option A
Quick Check:
Fingerprint all files with pattern for tracking [OK]
Hint: Fingerprint all files with a pattern to track multiple artifacts [OK]
Common Mistakes:
Fingerprinting only one file when multiple exist
Confusing stash with fingerprinting
Skipping fingerprinting in later builds
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.