Updated CKA page as well.
2.4 KiB
Circle CI
Circle CI Questions
Circle CI 101
What is Circle CI?
Circle CI: "CircleCI is a continuous integration and continuous delivery platform that can be used to implement DevOps practices."
What are some benefits of Circle CI?
Circle CI Docs: "SSH into any job to debug your build issues. Set up parallelism in your .circleci/config.yml file to run jobs faster. Configure caching with two simple keys to reuse data from previous jobs in your workflow. Configure self-hosted runners for unique platform support. Access Arm resources for the machine executor. Use orbs, reusable packages of configuration, to integrate with third parties. Use pre-built Docker images in a variety of languages. Use the API to retrieve information about jobs and workflows. Use the CLI to access advanced tools locally. Get flaky test detection with test insights."
Explain the following:
- Pipeline
- Workflow
- Jobs
- Steps
- Pipeline: the entire CI/CD configuration (.circleci/config.yaml)
- Workflow: primarily used when there is more than one job in the configuration to orchestrate the workflows
- Jobs: One or more steps to execute as part of the CI/CD process
- Steps: The actual commands to execute
What is an Orb?
Circle CI Docs: "Orbs are shareable packages of CircleCI configuration you can use to simplify your builds"
They can come from the public registry or defined privately as part of an organization.
Circle CI Hands-On 101
Where (in what location in the project) Circle CI pipelines are defined?
.circleci/config.yml
Explain the following configuration file
version: 2.1
jobs:
say-hello:
docker:
- image: cimg/base:stable
steps:
- checkout
- run:
name: "Say hello"
command: "echo Hello, World!"
workflows:
say-hello-workflow:
jobs:
- say-hello
version: 2.1
jobs:
say-hello:
docker:
- image: cimg/base:stable
steps:
- checkout
- run:
name: "Say hello"
command: "echo Hello, World!"
workflows:
say-hello-workflow:
jobs:
- say-hello
This configuration file will set up one job that will checkout the code of the project will run the command echo Hello, World!
.
It will run in a container using the image cimg/base:stable
.