0
0
Jenkinsdevops~10 mins

Archiving artifacts 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 archive the build artifacts in Jenkins.

Jenkins
archiveArtifacts '[1]'
Drag options to blanks, or click blank then click option'
Abuild/output/*.jar
Bbuild/output/*.exe
Csrc/*.java
Ddocs/*.md
Attempts:
3 left
💡 Hint
Common Mistakes
Using source code files instead of build output files.
Using wrong file extensions like .exe for Java projects.
2fill in blank
medium

Complete the code to archive all files inside the 'dist' folder.

Jenkins
archiveArtifacts '[1]'
Drag options to blanks, or click blank then click option'
Abin/*
Bdist/**/*.js
Csrc/*
Ddist/*
Attempts:
3 left
💡 Hint
Common Mistakes
Using patterns that only match some files, like '*.js' when other files exist.
Using source folders instead of distribution folders.
3fill in blank
hard

Fix the error in the code to archive all files recursively inside 'output' folder.

Jenkins
archiveArtifacts '[1]'
Drag options to blanks, or click blank then click option'
Aoutput/*.txt
Boutput/*
Coutput/**
Doutput
Attempts:
3 left
💡 Hint
Common Mistakes
Using single asterisk which does not include subfolders.
Using folder name without wildcard which does not match files.
4fill in blank
hard

Fill both blanks to archive all '.log' files and exclude 'debug.log'.

Jenkins
archiveArtifacts artifacts: '[1]', excludes: '[2]'
Drag options to blanks, or click blank then click option'
A**/*.log
Bdebug.log
C**/*.txt
Dbuild.log
Attempts:
3 left
💡 Hint
Common Mistakes
Excluding a folder instead of a file.
Using wrong file extensions in patterns.
5fill in blank
hard

Fill all three blanks to archive all '.jar' files, exclude 'test.jar', and allow empty archives.

Jenkins
archiveArtifacts artifacts: '[1]', excludes: '[2]', allowEmptyArchive: [3]
Drag options to blanks, or click blank then click option'
A**/*.jar
Btest.jar
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Setting allowEmptyArchive to false causing build failure.
Wrong exclude pattern causing important files to be skipped.