0
0
Jenkinsdevops~20 mins

Freestyle job creation in Jenkins - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Freestyle Job Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Jenkins Freestyle Job: Build Trigger Output
You have a Jenkins freestyle job configured to run a shell command:
echo Hello Jenkins

What will be the output in the Jenkins console log after the build runs?
Jenkins
echo Hello Jenkins
ABuild failed
Becho Hello Jenkins
CHello Jenkins
DNo output
Attempts:
2 left
💡 Hint
The shell command output is shown in the console log.
Configuration
intermediate
2:00remaining
Setting Build Triggers in Freestyle Job
Which option correctly configures a Jenkins freestyle job to trigger builds every 15 minutes using the built-in scheduler syntax?
AH/15 * * * *
B*/15 * * * *
C15 * * * *
D0 15 * * *
Attempts:
2 left
💡 Hint
Jenkins uses 'H' to distribute load evenly.
Troubleshoot
advanced
2:30remaining
Freestyle Job Fails to Archive Artifacts
A Jenkins freestyle job is configured to archive artifacts from the path 'build/output/*.jar'. After a successful build, no artifacts are archived. What is the most likely cause?
AThe archive step is placed before the build step
BThe build did not produce any .jar files in 'build/output/'
CThe workspace was cleaned before archiving
DThe Jenkins user lacks permission to read the files
Attempts:
2 left
💡 Hint
Check if the files exist in the specified path after build.
🔀 Workflow
advanced
2:00remaining
Freestyle Job Post-build Actions Order
In a Jenkins freestyle job, you want to run a shell script after archiving artifacts and then send an email notification. Which order of post-build actions is correct?
AEmail notification → Execute shell → Archive artifacts
BExecute shell → Archive artifacts → Email notification
CEmail notification → Archive artifacts → Execute shell
DArchive artifacts → Execute shell → Email notification
Attempts:
2 left
💡 Hint
Archiving should happen before any post-build scripts that depend on artifacts.
Best Practice
expert
3:00remaining
Securing Credentials in Freestyle Jobs
What is the best practice to securely use credentials in a Jenkins freestyle job without exposing them in the build logs?
AUse Jenkins Credentials Plugin and inject credentials via environment variables
BHardcode credentials in the shell build step
CStore credentials in a plain text file in the workspace
DPass credentials as command line arguments in the build step
Attempts:
2 left
💡 Hint
Jenkins has a plugin designed for managing secrets safely.