Download GitLab 201 Tool Exam: A Comprehensive Quiz on GitLab Features and Functionality and more Exams Technology in PDF only on Docsity!
- Which of the following best describes GitLab in the DevOps lifecycle? A) GitLab is solely a code hosting platform B) GitLab is an end-to-end DevOps platform covering everything from version control to CI/CD and deployment C) GitLab only focuses on issue tracking D) GitLab is primarily used for documentation management Correct Answer: B Explanation: GitLab provides a complete DevOps solution, supporting version control, CI/CD, security scanning, issue tracking, and more.
- What is one key difference between GitLab Community Edition (CE) and GitLab Enterprise Edition (EE)? A) GitLab CE and EE are identical in all features B) GitLab EE includes additional proprietary features and support C) GitLab CE can only be installed on Windows D) GitLab EE is always free Correct Answer: B Explanation: GitLab EE has additional proprietary features (like advanced security scanning and team management capabilities), which are not available in GitLab CE.
- Which architecture style does GitLab primarily follow for its core services?
A) Serverless architecture B) Monolithic application using multiple services (Omnibus) C) Peer-to-peer distributed architecture D) Single-page application with no backend Correct Answer: B Explanation: GitLab uses a monolithic approach bundled via Omnibus, although it can also be installed from source or Docker. The Omnibus package includes all required services for easy installation.
- Which of the following benefits is offered by GitLab? A) Eliminates the need for version control B) Provides an integrated platform for code collaboration, CI/CD, and project management C) Replaces all external cloud services automatically D) Only works with large enterprise teams Correct Answer: B Explanation: GitLab integrates code collaboration, CI/CD, and project management, making it a comprehensive platform for individuals and teams of all sizes.
- Which statement best describes GitLab’s role in a DevOps toolchain? A) It only serves as a Git repository host B) It covers code versioning but not deployment
Correct Answer: A Explanation: GitLab supports multiple installation methods, including Omnibus packages, source installation, Docker images, and others.
- When setting up GitLab for the first time, which of the following actions is typically required? A) No initial configuration is needed B) Manually editing the source code to add users C) Configuring external_url and root password in GitLab’s configuration D) Stopping all GitLab services immediately Correct Answer: C Explanation: After installing, you typically set the external URL and configure an admin (root) password to access the GitLab instance.
- Which public cloud platforms are commonly used for deploying GitLab? A) AWS, GCP, and Azure B) Only AWS C) Only Azure D) Only on self-managed local servers Correct Answer: A
Explanation: GitLab can be installed on AWS, GCP, Azure, or self-managed on-premise environments.
- In GitLab’s dashboard, which section provides a quick overview of the user’s projects, groups, and recent activity? A) Merge Requests page B) Issues page C) User Profile page D) Main Dashboard Correct Answer: D Explanation: When you log in, the Main Dashboard gives a quick overview of your projects, groups, and recent activities.
- Where can you find high-level settings such as user profile preferences and personal access tokens in GitLab’s web interface? A) Under the “Settings” icon in each Project B) Under the “Profile” or “Preferences” section in the top-right user menu C) Hidden in the “Admin Area” by default D) Accessible only from the command line Correct Answer: B Explanation: Personal settings and access tokens are located in the user menu’s Profile or Preferences area.
A) Private, Internal, Public B) Public, Confidential, Shared C) Internal, External, Confidential D) Free, Premium, Platinum Correct Answer: A Explanation: GitLab provides three visibility levels for projects: Private, Internal, and Public.
- What does making a project “Public” in GitLab imply? A) No one can see it B) Everyone, including unauthenticated users, can view and clone the repository C) Only system administrators can see the project D) It is hidden from all users Correct Answer: B Explanation: Public projects allow anyone (even without a GitLab account) to view and clone the repository.
- Why would you use a GitLab project template? A) To restrict project creation to administrators only B) To quickly create new projects with predefined settings and structure C) To remove all existing settings from a new project
D) To ensure the project cannot be accessed by any user Correct Answer: B Explanation: Project templates let you start with predefined configurations and structures, speeding up project creation.
- Which role in GitLab typically has the highest level of permissions within a project? A) Developer B) Reporter C) Maintainer D) Guest Correct Answer: C Explanation: The Maintainer role has broad permissions over a project, including setting up CI/CD, protecting branches, and more. (Owner role exists at the group level.)
- What is the primary purpose of cloning a repository from GitLab? A) To delete all files in the original repository B) To create a local copy of the repository on your machine C) To remove the original repository’s commit history D) To migrate the repository to another hosting platform automatically
- In GitLab, when should you consider merging branches? A) Immediately after creating a new branch B) When your feature branch is stable and ready to be integrated into the target branch C) Only if there are no merge conflicts across the entire repository D) Merging is not supported in GitLab Correct Answer: B Explanation: You merge branches once your work is tested, reviewed, and ready to integrate with the target branch.
- How are tags used in GitLab repositories? A) They replace branch names entirely B) They allow referencing a specific point in the project’s history, often used for releases C) They delete previous commits D) They merge branches automatically Correct Answer: B Explanation: Tags mark specific points in the repository, often corresponding to release versions or major milestones.
- Which of the following is true about GitLab’s repository mirroring feature?
A) It allows automatic synchronization with another repository B) It permanently locks both repositories C) It only works for GitHub D) It disables commit history tracking Correct Answer: A Explanation: Repository mirroring can synchronize a GitLab project with an external repository, keeping them up-to-date automatically.
- What does protecting a branch in GitLab accomplish? A) It prevents accidental force pushes or direct commits to critical branches B) It deletes all commits on that branch C) It allows only merging from a single user D) It merges all branches automatically Correct Answer: A Explanation: Branch protection prevents unauthorized alterations and restricts who can directly push or force push to that branch.
- Which setting can you enable to require certain checks or approvals before merging into a protected branch? A) Pipeline skipping B) Merge request approvals
Correct Answer: B Explanation: A job is an individual task within a stage in the CI/CD pipeline (e.g., build, test, deploy).
- Which concept in GitLab CI/CD represents the sequential or parallel arrangement of jobs? A) Runners B) Stages C) Issues D) Templates Correct Answer: B Explanation: Stages group jobs in a specific sequence, controlling job execution order.
- What is the purpose of a GitLab Runner? A) It merges changes automatically B) It executes CI/CD jobs specified in the pipeline C) It manages user permissions within GitLab D) It handles code reviews and approvals Correct Answer: B
Explanation: GitLab Runners fetch the project’s code, run the CI/CD jobs, and report results back to GitLab.
- Which runner type is usually shared across multiple projects? A) Specific Runner B) Shell Runner only C) Shared Runner D) Group Runner Correct Answer: C Explanation: Shared Runners can be used by multiple projects within a GitLab instance, while Specific Runners are tied to a single project or group.
- What might you configure if you want a CI/CD job to run in a Docker container with specific dependencies? A) Use a shell runner with default settings B) Use a Docker executor in the .gitlab-ci.yml file C) Use a Windows batch file to replicate Docker behavior D) Use repository mirroring Correct Answer: B Explanation: With a Docker executor, your CI/CD jobs run in Docker containers that can include the dependencies you need.
A) Store them in a public repository file B) Include them in README.md C) Use GitLab CI/CD variables set to “protected” or “masked” D) GitLab does not support storing secrets Correct Answer: C Explanation: GitLab allows you to add encrypted CI/CD variables that are masked in logs to protect sensitive data.
- What is the primary advantage of using the GitLab CI Linter tool? A) It removes all errors in your code B) It validates your .gitlab-ci.yml syntax and highlights issues before running pipelines C) It merges conflicting branches automatically D) It only works on older versions of GitLab Correct Answer: B Explanation: The CI Linter helps you ensure your pipeline configuration file is correct before committing and running a pipeline.
- In GitLab, what does an “Artifact” refer to in CI/CD pipelines? A) A code review comment B) A file or bundle of files generated by a job and stored for later use
C) A project issue D) A Docker executor Correct Answer: B Explanation: Artifacts are files (e.g., build outputs, test results) that a CI/CD job saves for later stages or for download.
- How can you speed up pipeline execution times in GitLab? A) Disable all tests B) Use caching and parallel jobs where possible C) Avoid branching D) Use only manual triggers Correct Answer: B Explanation: By caching dependencies and running jobs in parallel, you can reduce pipeline run times.
- What does the “Needs” keyword do in a GitLab CI/CD configuration? A) It stops a job from running B) It defines specific job dependencies and allows parallel execution C) It is used for environment variable substitution D) It merges the current branch
Explanation: Scheduled Pipelines let you automate pipeline runs at specified times (e.g., nightly builds).
- What happens if a pipeline job fails in GitLab? A) The pipeline continues to the next stage B) The entire pipeline fails, unless you configure allow_failure: true C) The job is skipped and removed from the log D) It triggers a rollback automatically Correct Answer: B Explanation: By default, if a job fails, the pipeline stops. You can configure certain jobs to allow failure without stopping the entire pipeline.
- Which section in GitLab helps manage the tasks you need to do for a project? A) The Project Settings menu B) The Issues section C) The Merge Requests section D) The Wiki section Correct Answer: B Explanation: GitLab Issues are used to track and manage tasks, bugs, and feature requests within a project.
- Which status indicates that an issue in GitLab is actively being worked on? A) Closed B) Open C) Merged D) Archived Correct Answer: B Explanation: An Open issue means it’s active or in progress, whereas Closed means it’s considered resolved or completed.
- How can you categorize or group issues in GitLab to manage workflow more effectively? A) By pushing them to a separate remote B) By assigning labels and milestones C) By adding them to .gitlab-ci.yml D) By adding them to a Merge Request Correct Answer: B Explanation: Labels help categorize issues, and milestones can group issues under a goal or release timeframe.
- What is a GitLab Issue template used for? A) It automatically closes the issue when opened