Recall & Review
beginner
What is a Jenkinsfile?
A Jenkinsfile is a text file that contains the definition of a Jenkins pipeline. It tells Jenkins how to build, test, and deploy your project automatically.
Click to reveal answer
intermediate
What are the two types of Jenkins pipelines you can define in a Jenkinsfile?
The two types are Declarative Pipeline and Scripted Pipeline. Declarative is simpler and structured, Scripted is more flexible and uses Groovy code.
Click to reveal answer
beginner
Where should you store the Jenkinsfile in your project?
You should store the Jenkinsfile in the root directory of your project repository. This way, Jenkins can find it easily when it checks out your code.
Click to reveal answer
beginner
How does Jenkins use the Jenkinsfile during a build?
Jenkins reads the Jenkinsfile to understand the steps to run. It executes those steps in order, like compiling code, running tests, and deploying, all automatically.
Click to reveal answer
intermediate
Why is using a Jenkinsfile better than configuring jobs manually in Jenkins UI?
Using a Jenkinsfile keeps your pipeline as code, which means it is version controlled, easy to review, share, and reproduce. Manual UI setup is error-prone and hard to track.
Click to reveal answer
What file name does Jenkins look for by default to define a pipeline?
✗ Incorrect
Jenkins looks for a file named 'Jenkinsfile' in the root of the repository to define the pipeline.
Which language is primarily used inside a Jenkinsfile for scripted pipelines?
✗ Incorrect
Scripted pipelines in Jenkinsfiles use Groovy language syntax.
Where is the best place to store your Jenkinsfile?
✗ Incorrect
Storing the Jenkinsfile in the root of your project repository allows Jenkins to find and use it automatically.
What is a key benefit of using a Jenkinsfile over manual job configuration?
✗ Incorrect
Jenkinsfile enables pipeline as code, which means your build steps are stored in version control and easy to manage.
Which pipeline type in Jenkinsfile is simpler and uses a structured syntax?
✗ Incorrect
Declarative Pipeline uses a simpler, structured syntax designed for easier writing and reading.
Explain what a Jenkinsfile is and why it is important in Jenkins automation.
Think about how Jenkins knows what steps to run automatically.
You got /3 concepts.
Describe the difference between Declarative and Scripted pipelines in a Jenkinsfile.
One is simpler and more readable, the other is more flexible.
You got /3 concepts.