Complete the code to enable fingerprinting for the artifact in a Jenkins pipeline.
fingerprint '[1]'
Using fingerprint 'target/*.jar' tells Jenkins to fingerprint all JAR files in the target directory, which are typical build artifacts.
Complete the code to archive and fingerprint the artifact in a Jenkins pipeline.
archiveArtifacts artifacts: '[1]', fingerprint: true
Archiving and fingerprinting the JAR files in the target directory ensures the artifacts are saved and tracked.
Fix the error in the fingerprint step to correctly fingerprint the artifact.
fingerprint [1]The fingerprint step requires the file pattern as a quoted string. Using single quotes is standard in Jenkins pipelines.
Fill both blanks to archive and fingerprint multiple artifact types in a Jenkins pipeline.
archiveArtifacts artifacts: '[1]', fingerprint: [2]
To archive multiple artifact types, list them separated by commas as a string. Setting fingerprint: true enables fingerprinting.
Fill all three blanks to create a fingerprint for a specific artifact, archive it, and print a confirmation message.
fingerprint '[1]' archiveArtifacts artifacts: '[2]', fingerprint: true println '[3] created and fingerprinted.'
This code fingerprints and archives the target/app.jar artifact, then prints a confirmation message using the word 'Artifact'.