Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 MCQs Continuous Integration (CI) & Build Automation

INT331 — Fundamentals Of Devops 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 CI fundamentals and benefits Easy

    What does the abbreviation CI stand for in DevOps?

  2. Question 2 of 60 CI fundamentals and benefits Easy

    Which of the following is a key benefit of Continuous Integration?

  3. Question 3 of 60 CI fundamentals and benefits Easy

    In CI, how often are developers encouraged to integrate their code into the main branch?

  4. Question 4 of 60 CI Pipeline Architecture Easy

    What typically triggers a CI pipeline to start running?

  5. Question 5 of 60 CI Pipeline Architecture Easy

    Which of the following is a common stage found in a CI pipeline?

  6. Question 6 of 60 CI Pipeline Architecture Easy

    In a CI pipeline, what is an artifact?

  7. Question 7 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Easy

    Which of the following CI tools is an open-source automation server written primarily in Java?

  8. Question 8 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Easy

    Which CI/CD tool is built directly into the GitHub platform?

  9. Question 9 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Easy

    What file format is commonly used to define GitHub Actions workflows?

  10. Question 10 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Easy

    Which configuration file is used to define pipelines in GitLab CI?

  11. Question 11 of 60 Build Tools Overview: Maven, Gradle, npm Easy

    Which build tool uses a file named pom.xml for its configuration?

  12. Question 12 of 60 Build Tools Overview: Maven, Gradle, npm Easy

    Which build tool is most commonly associated with JavaScript/Node.js projects?

  13. Question 13 of 60 Build Tools Overview: Maven, Gradle, npm Easy

    Which build tool uses a Groovy or Kotlin based DSL in files like build.gradle?

  14. Question 14 of 60 Build Tools Overview: Maven, Gradle, npm Easy

    Which file stores project dependencies for an npm project?

  15. Question 15 of 60 Writing Jenkins Declarative Pipelines Easy

    What is the name of the file used to define a Jenkins pipeline as code?

  16. Question 16 of 60 Writing Jenkins Declarative Pipelines Easy

    In a Jenkins declarative pipeline, which block contains all the stages?

  17. Question 17 of 60 Writing Jenkins Declarative Pipelines Easy

    In a Jenkins declarative pipeline, what does the agent directive specify?

  18. Question 18 of 60 Automated Builds Easy

    What is the main goal of an automated build?

  19. Question 19 of 60 Automated Testing Easy

    Why is automated testing important in a CI pipeline?

  20. Question 20 of 60 Test Automation Basics (Unit Testing, Coverage) Easy

    What does code coverage measure?

  21. Question 21 of 60 CI fundamentals and benefits Medium

    A team merges code into the shared main branch only once every two weeks, resulting in painful merge conflicts. Which core Continuous Integration principle would most directly address this problem?

  22. Question 22 of 60 CI fundamentals and benefits Medium

    Which outcome is the least likely direct benefit of adopting Continuous Integration?

  23. Question 23 of 60 CI Pipeline Architecture Medium

    In a typical CI pipeline, what event most commonly acts as the trigger that starts a pipeline run?

  24. Question 24 of 60 CI Pipeline Architecture Medium

    A pipeline is arranged so that if the compile/build stage fails, no later stages run. What is the primary reason for this fail-fast ordering?

  25. Question 25 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Medium

    Which statement correctly distinguishes GitHub Actions from a self-hosted Jenkins server in a default setup?

  26. Question 26 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Medium

    In GitLab CI, which file located at the repository root defines the pipeline configuration?

  27. Question 27 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Medium

    A team wants to run each job of their CI pipeline inside a fresh, isolated container image they specify. Which CI tool is especially known for making per-job Docker containers a first-class, native concept via a docker executor?

  28. Question 28 of 60 Build Tools Overview: Maven, Gradle, npm Medium

    A Java project uses Maven. Which command compiles the code, runs tests, and packages the result into a JAR/WAR without installing it to the local repository?

  29. Question 29 of 60 Build Tools Overview: Maven, Gradle, npm Medium

    What is the primary functional advantage of Gradle's incremental build support compared to a naive full rebuild every time?

  30. Question 30 of 60 Build Tools Overview: Maven, Gradle, npm Medium

    In a Node.js project, which file records the exact resolved version of every installed dependency to ensure reproducible installs across machines?

  31. Question 31 of 60 Build Tools Overview: Maven, Gradle, npm Medium

    Which pair correctly matches a build tool with the ecosystem it is most commonly used in?

  32. Question 32 of 60 Writing Jenkins Declarative Pipelines Medium

    In a Jenkins Declarative Pipeline, which block is required at the top level to specify where the pipeline will execute?

  33. Question 33 of 60 Writing Jenkins Declarative Pipelines Medium

    Consider this Jenkins snippet:
    groovy
    post {
    always {
    echo 'Cleaning up'
    }
    }

    When does the always block execute?

  34. Question 34 of 60 Writing Jenkins Declarative Pipelines Medium

    In a Declarative Pipeline, where must individual stage blocks be placed?

  35. Question 35 of 60 Writing Jenkins Declarative Pipelines Medium

    A pipeline author wants a variable available as an environment variable to every step in all stages of the build. Which directive should be used at the top level of the Declarative Pipeline?

  36. Question 36 of 60 Automated Builds Medium

    Which practice best characterizes an automated build in a CI context?

  37. Question 37 of 60 Automated Builds Medium

    Why is producing a versioned, immutable build artifact (e.g., a specific JAR) important in a CI/CD workflow?

  38. Question 38 of 60 Automated Testing Medium

    A CI pipeline runs unit tests automatically on every push. A commit introduces code that breaks a test. What is the most valuable immediate benefit of this automation?

  39. Question 39 of 60 Automated Testing Medium

    Which ordering of test types generally reflects a healthy test pyramid, from most to fewest tests?

  40. Question 40 of 60 Test Automation Basics (Unit Testing, Coverage) Medium

    A test suite reports 85% line coverage. What does this figure specifically indicate?

  41. Question 41 of 60 CI fundamentals and benefits Hard

    A team practices trunk-based development with CI, but developers still experience frequent 'integration hell' at release time. Investigation shows that although commits are pushed to the main branch several times daily, the CI pipeline only runs a compile step and no tests, and feature flags are absent. Which corrective action most directly restores the core CI benefit being violated?

  42. Question 42 of 60 CI Pipeline Architecture Hard

    In a fan-out/fan-in CI pipeline, a build stage produces an artifact consumed by three parallel test stages (unit, integration, contract), which then converge into a single deploy stage. If the integration test stage has a flaky 20% failure rate per run and the pipeline retries only that stage up to 2 additional times, what is the approximate probability the pipeline reaches the deploy stage on a given trigger (assuming other stages always pass)?

  43. Question 43 of 60 Writing Jenkins Declarative Pipelines Hard

    Consider this Jenkins declarative snippet:

    groovy
    pipeline {
    agent none
    stages {
    stage('Build') {
    agent { label 'linux' }
    steps { sh 'make' }
    }
    stage('Test') {
    agent { label 'linux' }
    steps { sh './run-tests --input target/app.bin' }
    }
    }
    }


    The Test stage fails because target/app.bin does not exist. What is the root cause?

  44. Question 44 of 60 Build Tools Overview: Maven, Gradle, npm Hard

    A Gradle build is slow on CI despite the code changing minimally between runs. The CI runner is ephemeral (fresh container per build). Which combination most effectively reduces build time while remaining correct?

  45. Question 45 of 60 Test Automation Basics (Unit Testing, Coverage) Hard

    A module has 100% line coverage but a production bug slips through: a function divide(a, b) throws on b == 0, which callers never handle. Why did high coverage fail to catch this, and what metric would have exposed the gap?

  46. Question 46 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Hard

    In GitHub Actions, a workflow defines two jobs: build and deploy, where deploy has needs: build. Both jobs set concurrency: production. A developer pushes two commits in quick succession. What behavior results?

  47. Question 47 of 60 Automated Builds Hard

    A reproducible build requirement states that building the same commit twice must yield byte-identical artifacts. A Java build currently fails this check. Which factor is the most likely culprit?

  48. Question 48 of 60 CI Pipeline Architecture Hard

    A pipeline uses caching to speed up dependency installation. After a security advisory, a compromised dependency version was published and later yanked. The team pins versions but still gets the compromised artifact on some CI runs. What architectural flaw explains this?

  49. Question 49 of 60 Writing Jenkins Declarative Pipelines Hard

    In a Jenkins declarative pipeline, you need a stage to run only when the branch is main AND a prior stage set an environment variable DEPLOYABLE=true. Which when construct is correct?

  50. Question 50 of 60 Automated Testing Hard

    A CI suite runs 5000 tests in 40 minutes. The team wants sub-10-minute feedback. They shard tests across 4 parallel runners by simple alphabetical file split, but one runner consistently takes 30 minutes. What is the best fix?

  51. Question 51 of 60 Build Tools Overview: Maven, Gradle, npm Hard

    During npm ci on CI, the build fails with an error that package-lock.json is out of sync with package.json. A developer suggests switching to npm install to 'auto-fix' it. Why is this the wrong fix for CI?

  52. Question 52 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Hard

    In GitLab CI, a job in the test stage must run only for merge requests targeting main, but never on scheduled pipelines. Which rules configuration achieves this correctly?

  53. Question 53 of 60 Test Automation Basics (Unit Testing, Coverage) Hard

    A team enforces a coverage gate of 80%. A developer adds a large auto-generated file with no tests, dropping coverage below the gate. To pass, they add coverage exclusions for generated code. Later, a genuine untested handler also gets excluded by an overly broad glob. What is the key lesson about coverage gates?

  54. Question 54 of 60 CI fundamentals and benefits Hard

    A manager claims 'we have CI because we run a nightly build and test job'. A CI expert disagrees. Which argument best explains why a nightly-only build is not true Continuous Integration?

  55. Question 55 of 60 Automated Builds Hard

    A Maven multi-module project builds fine locally but fails on CI with 'Could not resolve dependencies for project A: artifact B not found'. Module A depends on module B, both in the same reactor. Locally, B was previously mvn installed. What is the correct CI-safe build command?

  56. Question 56 of 60 Popular CI Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI Hard

    In CircleCI, a workflow uses a context to inject shared secrets and restricts it to a security group. A contractor's job in the same workflow needs a different, non-privileged credential set. What is the correct approach to enforce least privilege?

  57. Question 57 of 60 Writing Jenkins Declarative Pipelines Hard

    A declarative pipeline must guarantee that a cleanup step runs whether the build succeeds, fails, or is aborted, and a notification runs only on failure. Which structure is correct?

  58. Question 58 of 60 Automated Testing Hard

    A CI pipeline reports intermittent test failures that disappear on re-run. Analysis shows two tests share a database table and run in parallel. Which statement best characterizes the problem and the most robust fix?

  59. Question 59 of 60 CI Pipeline Architecture Hard

    A pipeline separates a fast 'commit stage' (compile + unit tests, target < 5 min) from a slower 'acceptance stage'. A proposal suggests moving slow end-to-end tests into the commit stage 'to catch more bugs earlier'. Why does this typically harm the pipeline?

  60. Question 60 of 60 Build Tools Overview: Maven, Gradle, npm Hard

    Comparing Maven and Gradle for a large monorepo, a team values incremental builds and task-level caching but also wants a low-magic, declarative configuration. Which trade-off statement is most accurate?

That's unit 3

Answer a few questions and your score shows up here.