Bird
Raised Fist0
Jenkinsdevops~5 mins

Hybrid CI/CD approaches in Jenkins - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What is a Hybrid CI/CD approach?
A Hybrid CI/CD approach combines both centralized and decentralized pipelines to leverage the strengths of each, allowing flexibility and scalability in software delivery.
Click to reveal answer
intermediate
Why use a Hybrid CI/CD approach in Jenkins?
It allows teams to use shared centralized pipelines for common tasks while enabling individual teams to customize their own pipelines, improving efficiency and collaboration.
Click to reveal answer
beginner
Name two benefits of Hybrid CI/CD approaches.
1. Flexibility to adapt pipelines per team needs. 2. Better resource management by sharing common pipeline components.
Click to reveal answer
intermediate
How can Jenkinsfiles be used in Hybrid CI/CD?
Jenkinsfiles can be stored in each project repository for team-specific pipelines, while shared libraries provide reusable pipeline code for centralized tasks.
Click to reveal answer
advanced
What is a common challenge when implementing Hybrid CI/CD?
Maintaining consistency and avoiding duplication between centralized and decentralized pipelines can be challenging without clear governance and communication.
Click to reveal answer
What does a Hybrid CI/CD approach combine?
ACentralized and decentralized pipelines
BManual and automated testing only
COnly cloud-based pipelines
DOnly on-premise pipelines
In Jenkins, where are team-specific pipeline definitions usually stored in a Hybrid CI/CD setup?
AIn each project repository as Jenkinsfiles
BOnly in the Jenkins master server
CIn external cloud storage unrelated to the project
DIn a shared database
What is a key benefit of using shared libraries in Jenkins Hybrid CI/CD?
AReplacing all Jenkinsfiles
BRunning pipelines only manually
CEliminating the need for pipelines
DReusing common pipeline code across projects
Which is a common challenge in Hybrid CI/CD approaches?
AOnly using one programming language
BLack of any automation
CMaintaining consistency between pipelines
DNo need for version control
Why might teams prefer Hybrid CI/CD over fully centralized pipelines?
ATo use only manual deployments
BTo allow customization and faster iteration
CTo remove automation completely
DTo avoid using Jenkins
Explain how Jenkins supports Hybrid CI/CD approaches with Jenkinsfiles and shared libraries.
Think about where pipeline code lives and how teams share common parts.
You got /3 concepts.
    Describe the main benefits and challenges of adopting a Hybrid CI/CD approach.
    Consider what makes hybrid useful and what problems it might cause.
    You got /3 concepts.

      Practice

      (1/5)
      1. What is the main purpose of using a hybrid CI/CD approach in Jenkins pipelines?
      easy
      A. To combine automatic and manual steps for safer deployments
      B. To run only manual deployment steps without automation
      C. To automate all steps without any manual intervention
      D. To disable pipeline triggers and run jobs manually

      Solution

      1. Step 1: Understand hybrid CI/CD concept

        Hybrid CI/CD mixes automatic and manual steps to balance speed and control.
      2. Step 2: Identify Jenkins pipeline usage

        Jenkins pipelines use the input step to pause for manual approval, enabling safer deployments.
      3. Final Answer:

        To combine automatic and manual steps for safer deployments -> Option A
      4. Quick Check:

        Hybrid CI/CD = mix auto + manual [OK]
      Hint: Hybrid means mixing auto and manual steps [OK]
      Common Mistakes:
      • Thinking hybrid means fully manual
      • Assuming hybrid means fully automated
      • Confusing hybrid with disabling triggers
      2. Which Jenkins pipeline syntax correctly adds a manual approval step?
      easy
      A. manualApproval('Approve deployment?')
      B. input message: 'Approve deployment?'
      C. pause('Approve deployment?')
      D. waitForInput('Approve deployment?')

      Solution

      1. Step 1: Recall Jenkins input step syntax

        The input step pauses the pipeline and asks for manual approval with a message.
      2. Step 2: Match syntax to options

        Only input message: 'Approve deployment?' is valid Jenkins pipeline syntax for manual input.
      3. Final Answer:

        input message: 'Approve deployment?' -> Option B
      4. Quick Check:

        Jenkins manual step = input message [OK]
      Hint: Use 'input message:' for manual approval in Jenkins [OK]
      Common Mistakes:
      • Using non-existent commands like manualApproval
      • Confusing input with pause or waitForInput
      • Missing the 'message:' keyword
      3. Given this Jenkins pipeline snippet, what happens when it runs?
      pipeline {
        agent any
        stages {
          stage('Build') {
            steps {
              echo 'Building...'
            }
          }
          stage('Deploy') {
            steps {
              input message: 'Approve deployment?'
              echo 'Deploying...'
            }
          }
        }
      }
      medium
      A. Pipeline fails because input step is invalid
      B. Build and deploy run automatically without pause
      C. Deploy runs first, then build runs after approval
      D. Build runs, then pipeline waits for manual approval before deploying

      Solution

      1. Step 1: Analyze pipeline stages order

        Stages run in order: 'Build' first, then 'Deploy'.
      2. Step 2: Understand input step effect

        The input step pauses the pipeline and waits for manual approval before continuing to echo 'Deploying...'.
      3. Final Answer:

        Build runs, then pipeline waits for manual approval before deploying -> Option D
      4. Quick Check:

        input pauses pipeline for approval [OK]
      Hint: Input pauses pipeline until manual approval [OK]
      Common Mistakes:
      • Assuming deploy runs automatically without pause
      • Thinking input step causes failure
      • Confusing stage order
      4. You added this input step in your Jenkins pipeline but it never pauses for approval:
      input 'Approve deployment?'

      What is the likely problem?
      medium
      A. The input step requires a named parameter like message: to work
      B. The input step must be inside a script block
      C. The input step only works in declarative pipelines
      D. The input step needs a timeout parameter

      Solution

      1. Step 1: Check input step syntax

        The input step requires named parameters like message: 'text' for proper execution.
      2. Step 2: Identify missing named parameter

        Using just a string without message: causes Jenkins to ignore the input step and not pause.
      3. Final Answer:

        The input step requires a named parameter like message: to work -> Option A
      4. Quick Check:

        Input needs message: parameter [OK]
      Hint: Always use 'message:' with input step [OK]
      Common Mistakes:
      • Omitting message: parameter
      • Thinking input must be in script block
      • Assuming timeout is mandatory
      5. You want a Jenkins pipeline that builds automatically, then waits for manual approval, and finally deploys only if approved within 10 minutes. Which snippet correctly implements this hybrid CI/CD approach?
      hard
      A. timeout(time: 10, unit: MINUTES) { input message: 'Approve deployment?' } echo 'Deploying...'
      B. input message: 'Approve deployment?', timeout: 10, unit: 'MINUTES' if (currentBuild.result != 'ABORTED') { echo 'Deploying...' }
      C. timeout(time: 10, unit: 'MINUTES') { input message: 'Approve deployment?' echo 'Deploying...' }
      D. input message: 'Approve deployment?', timeout: 10, unit: 'MINUTES' echo 'Deploying...'

      Solution

      1. Step 1: Understand timeout with input step

        To limit approval wait time, wrap input and deployment steps inside a timeout block.
      2. Step 2: Check which option wraps input and deploy inside timeout

        timeout(time: 10, unit: 'MINUTES') { input message: 'Approve deployment?' echo 'Deploying...' } wraps both input and echo 'Deploying...' inside timeout, ensuring deploy runs only if approved within 10 minutes.
      3. Final Answer:

        timeout(time: 10, unit: 'MINUTES') { input message: 'Approve deployment?' echo 'Deploying...' } -> Option C
      4. Quick Check:

        Timeout wraps input and deploy steps [OK]
      Hint: Wrap input and deploy in timeout block [OK]
      Common Mistakes:
      • Not wrapping deploy inside timeout
      • Checking build result incorrectly
      • Using timeout only around input without deploy
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard