Gitlab CI Flashcards

1
Q

What is GitLab CI/CD?

A

GitLab CI/CD is a continuous integration and continuous deployment (CI/CD) tool integrated into GitLab. It allows you to automate the build, test, and deployment processes of your applications. GitLab CI/CD uses pipelines defined in a .gitlab-ci.yml file to manage these processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you set up a GitLab CI/CD pipeline?

A

To set up a GitLab CI/CD pipeline:
Create a .gitlab-ci.yml file: Define the stages, jobs, and scripts for your pipeline.
Push to GitLab: Commit and push the .gitlab-ci.yml file to your repository.
Run Pipeline: GitLab automatically detects the file and runs the pipeline based on the defined stages and jobs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are GitLab runners?

A

GitLab runners are agents that execute the jobs defined in your CI/CD pipeline. Runners can be shared (provided by GitLab) or specific (self-hosted). They can run on various environments, including Docker, virtual machines, and bare-metal servers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you secure your GitLab CI/CD pipeline?

A

To secure your GitLab CI/CD pipeline:
Use Protected Variables: Store sensitive information in protected variables.
Restrict Runner Access: Limit runner access to specific projects or groups.
Use Secure Images: Use trusted and secure Docker images for your jobs.
Enable Two-Factor Authentication (2FA): Require 2FA for GitLab accounts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some common use cases for GitLab CI/CD?

A

Common use cases include:
Automated Testing: Run tests automatically on code changes.
Continuous Deployment: Deploy applications to production environments.
Code Quality Checks: Perform static code analysis and linting.
Infrastructure as Code: Manage infrastructure changes using tools like Terraform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly