CI/CD Tools and Practices Flashcards
What is the main goal of CI/CD?
To automate and streamline the software development lifecycle
What are the key principles of CI/CD?
Automate everything,
maintain a single source repository,
build and test every change,
keep the build fast,
test in a clone of the production environment,
make it easy to get the latest deliverables,
everyone can see the results of the latest build,
and automate deployment
What is the difference between continuous integration and continuous delivery/deployment?
Continuous integration focuses on automatically building and testing code changes
continuous delivery/deployment extends this to automatically releasing validated changes to production
What are some popular version control systems used in CI/CD?
Git, Mercurial, and Subversion (SVN)
What is a feature branch workflow?
A feature branch workflow involves creating separate branches for each feature or bugfix, which are then merged back into the main branch after review and testing
What is a pull request or merge request?
A pull request or merge request is a way to propose changes to the main branch of a repository, allowing for code review and discussion before merging
What is a build server?
A build server is a centralized system that automatically
compiles,
packages,
and tests code changes,
providing feedback on the success or failure of each build
What is a build pipeline?
A build pipeline is a series of automated steps that take code changes from version control,
build and test them,
prepare them for deployment
What are some popular CI/CD pipelines or build automation tools?
Jenkins, GitLab CI/CD, GitHub Actions, CircleCI, Travis CI, Bamboo, and TeamCity
What is a test automation framework?
A test automation framework is a set of guidelines, libraries, and tools that help structure and simplify the creation and maintenance of automated tests
What are some types of tests often automated in CI/CD?
Unit tests, integration tests, functional tests, performance tests, and security tests
What is code coverage?
Code coverage is a metric that measures the percentage of code lines, branches, or functions that are executed during automated tests
What is static code analysis?
Static code analysis is the process of examining code without executing it, to identify potential issues related to code quality, security, or compliance
What are some popular static code analysis tools?
SonarQube, Checkstyle, PMD, ESLint, and Pylint
What is Infrastructure as Code (IaC)?
Infrastructure as Code is the practice of managing and provisioning infrastructure resources using machine-readable definition files or scripts, enabling version control and automation
What are some popular IaC tools?
Terraform, AWS CloudFormation, Azure Resource Manager, Google Cloud Deployment Manager, Ansible, Puppet, and Chef
What is containerization?
Containerization is the process of packaging an application and its dependencies into a self-contained unit called a container, which can run consistently across different environments
What are some popular containerization tools?
Docker, Kubernetes, Amazon ECS, Google Kubernetes Engine, and Azure Kubernetes Service
What is continuous monitoring?
Continuous monitoring involves real-time observation and analysis of application and infrastructure metrics, logs, and events to detect issues and anomalies
What are some popular continuous monitoring tools?
Prometheus, Grafana, ELK stack (Elasticsearch, Logstash, Kibana), Nagios, and Datadog
What are the benefits of using CI/CD for software development teams?
Faster time-to-market, improved code quality, reduced risk, increased collaboration, and better scalability and reliability
What are some challenges in implementing CI/CD?
Complexity of setup and maintenance, cultural resistance to change, security and compliance concerns, and the need for specialized skills and knowledge
How can you measure the success of a CI/CD implementation?
Key metrics include deployment frequency, lead time for changes, mean time to recover (MTTR), and change failure rate
What is the role of a DevOps engineer in CI/CD?
A DevOps engineer is responsible for designing, implementing, and maintaining the CI/CD pipeline, as well as collaborating with development and operations teams to optimize processes and tooling
What are some best practices for secure CI/CD?
Implement access controls, use encrypted secrets management, perform regular security scans and audits, and follow the principle of least privilege
What does CI/CD stand for?
Continuous Integration and Continuous Delivery/Deployment
What is the purpose of CI/CD?
To automate the building, testing, and deployment of software, enabling faster and more reliable releases
What is GitLab?
GitLab is a web-based DevOps platform that provides Git repository management, issue tracking, CI/CD pipelines, and more
What is a GitLab pipeline?
A GitLab pipeline is a series of tasks, called jobs, that are executed automatically when code is pushed to a Git repository or when a specific action is taken
What is a GitLab runner?
A GitLab runner is an agent that runs the jobs defined in the GitLab pipeline on a server, container, or local machine
What is a .gitlab-ci.yml file?
A .gitlab-ci.yml file is a YAML file that defines the structure and order of a GitLab CI/CD pipeline, specifying the jobs to be executed
What are the benefits of using GitLab for CI/CD?
Benefits include version control integration, built-in CI/CD capabilities, a user-friendly web interface, and the ability to self-host or use GitLab’s cloud offering
What is continuous integration in GitLab?
Continuous integration in GitLab involves automatically building and testing code changes in a shared repository, ensuring that the changes integrate well with the existing codebase
What is continuous delivery in GitLab?
Continuous delivery in GitLab involves automatically preparing the built and tested code for release to production, often requiring manual approval to deploy
What is continuous deployment in GitLab?
Continuous deployment in GitLab involves automatically deploying the built and tested code to production without manual intervention, based on predefined conditions
What is a Git repository?
A Git repository is a version-controlled directory that tracks changes to files over time, allowing multiple people to collaborate on the same project
What is a merge request in GitLab?
A merge request in GitLab is a request to merge changes from one branch to another, often used for code review and collaboration
What is a branch in Git?
A branch in Git is a separate line of development that diverges from the main line, allowing developers to work on features or fixes without affecting the main codebase
What is a commit in Git?
A commit in Git is a snapshot of changes made to the files in a repository, along with a unique identifier and a message describing the changes
What is a job in GitLab CI/CD?
A job in GitLab CI/CD is a single task or step in a pipeline, such as building, testing, or deploying code
What is a stage in GitLab CI/CD?
A stage in GitLab CI/CD is a group of jobs that are executed in parallel, representing a phase in the pipeline such as build, test, or deploy
What is an artifact in GitLab CI/CD?
An artifact in GitLab CI/CD is a file or set of files created by a job, such as compiled binaries or test reports, which can be used by later jobs or downloaded
What is a cache in GitLab CI/CD?
A cache in GitLab CI/CD is a temporary storage area for reusable files, such as dependencies, to speed up subsequent pipeline runs
What is a trigger in GitLab CI/CD?
A trigger in GitLab CI/CD is an event that starts a pipeline, such as a push to a branch, a merge request, or a scheduled job
What is a variable in GitLab CI/CD?
A variable in GitLab CI/CD is a named value that can be used to store and pass information between jobs or pipelines, such as configuration settings or secrets
What is a secret variable in GitLab CI/CD?
A secret variable in GitLab CI/CD is a variable whose value is encrypted and not visible in the job logs or configuration files, used for sensitive information like passwords or API keys
What is a GitLab environment?
A GitLab environment is a logical representation of a deployment target, such as staging or production, which can be associated with a specific branch or tag
What is a GitLab issue?
A GitLab issue is a task, bug report, or feature request tracked within the GitLab platform, often used for project management and collaboration
What is a GitLab milestone?
A GitLab milestone is a way to group issues and merge requests within a specific time frame or release, helping to organize and track project progress
What is a GitLab tag?
A GitLab tag is a named reference to a specific commit, often used to mark release points or important milestones in the project history
What is GitLab Auto DevOps?
GitLab Auto DevOps is a set of pre-configured CI/CD templates and integrations that automatically build, test, and deploy applications based on best practices
What is GitLab Pages?
GitLab Pages is a feature that allows you to host static websites directly from your GitLab repository, with built-in support for custom domains and SSL/TLS certificates
What is GitLab Container Registry?
GitLab Container Registry is a built-in registry for storing and managing Docker container images, seamlessly integrated with GitLab’s CI/CD pipelines
What is GitLab Kubernetes integration?
GitLab Kubernetes integration allows you to connect your GitLab project with a Kubernetes cluster, enabling easy deployment and management of applications using GitLab CI/CD
What is GitLab Wiki?
GitLab Wiki is a collaborative documentation tool built into each GitLab project, allowing team members to create and maintain project documentation alongside the code