0
0
Jenkinsdevops~10 mins

Artifact fingerprinting in Jenkins - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable fingerprinting for the artifact in a Jenkins pipeline.

Jenkins
fingerprint '[1]'
Drag options to blanks, or click blank then click option'
Abuild.log
Btarget/*.jar
CREADME.md
DDockerfile
Attempts:
3 left
💡 Hint
Common Mistakes
Fingerprinting a log file instead of the artifact
Using a file that does not exist in the build workspace
2fill in blank
medium

Complete the code to archive and fingerprint the artifact in a Jenkins pipeline.

Jenkins
archiveArtifacts artifacts: '[1]', fingerprint: true
Drag options to blanks, or click blank then click option'
Abuild.log
Bdocs/*.md
Ctarget/*.jar
Dsrc/**/*.java
Attempts:
3 left
💡 Hint
Common Mistakes
Archiving source code files instead of build artifacts
Not enabling fingerprinting by setting fingerprint: true
3fill in blank
hard

Fix the error in the fingerprint step to correctly fingerprint the artifact.

Jenkins
fingerprint [1]
Drag options to blanks, or click blank then click option'
A'target/*.jar'
Btarget/*.jar
C"target/*.jar"
D['target/*.jar']
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the file pattern
Using a list instead of a string for the pattern
4fill in blank
hard

Fill both blanks to archive and fingerprint multiple artifact types in a Jenkins pipeline.

Jenkins
archiveArtifacts artifacts: '[1]', fingerprint: [2]
Drag options to blanks, or click blank then click option'
Atarget/*.jar, target/*.war
Btrue
Cfalse
Dtarget/*.zip
Attempts:
3 left
💡 Hint
Common Mistakes
Using a list instead of a comma-separated string for artifacts
Setting fingerprint to false or omitting it
5fill in blank
hard

Fill all three blanks to create a fingerprint for a specific artifact, archive it, and print a confirmation message.

Jenkins
fingerprint '[1]'
archiveArtifacts artifacts: '[2]', fingerprint: true
println '[3] created and fingerprinted.'
Drag options to blanks, or click blank then click option'
Atarget/app.jar
CArtifact
Dtarget/app.zip
Attempts:
3 left
💡 Hint
Common Mistakes
Using different artifact names in fingerprint and archive steps
Printing a message without context