CircleCI

Definition

CircleCI is a continuous integration and continuous delivery (CI/CD) platform that automates the software development process, enabling developers to build, test, and deploy applications efficiently. It integrates with version control systems like GitHub and Bitbucket, allowing teams to automate their workflows and ensure code quality through automated testing and deployment pipelines. CircleCI supports various programming languages and frameworks, providing flexibility and scalability for diverse development environments.

Secure Settings Example

version: 2.1

executors:
  secure-executor:
    docker:
      - image: circleci/python:3.8
    environment:
      PYTHON_ENV: production
      DATABASE_URL: ${DATABASE_URL}

jobs:
  build:
    executor: secure-executor
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
            pip install -r requirements.txt
      - run:
          name: Run tests
          command: |
            pytest --junitxml=test-results/junit.xml
    secrets:
      - DATABASE_URL

workflows:
  version: 2
  build_and_test:
    jobs:
      - build

Insecure Settings Example

version: 2.1

jobs:
  build:
    docker:
      - image: circleci/python:3.8
    steps:
      - checkout
      - run:
          name: Install dependencies
          command: |
            pip install -r requirements.txt
      - run:
          name: Run tests
          command: |
            pytest --junitxml=test-results/junit.xml
    environment:
      DATABASE_URL: postgres://user:password@localhost:5432/dbname

workflows:
  version: 2
  build_and_test:
    jobs:
      - build