codeclimate/codeclimate-bundler-audit

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2
init: &init
  run:
    name: init
    command: |
      echo '. .circleci/shared.bash' >> "$BASH_ENV"
      . .circleci/shared.bash
jobs:
  build_and_test:
    docker:
      - image: circleci/python:latest
    steps:
      - checkout
      - setup_remote_docker:
          docker_layer_caching: true
      - run: make test-image
      - run: make test

  release_images:
    machine:
      docker_layer_caching: true
    working_directory: ~/codeclimate/codeclimate-bundler-audit
    steps:
      - checkout
      - *init
      - run:
          name: Validate owner
          command: |
            if [ "$CIRCLE_PROJECT_USERNAME" -ne "codeclimate" ]
            then
              echo "Skipping release for non-codeclimate branches"
              circleci step halt
            fi
      - run: make image
      - run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
      - run: bin/deploy
      - run: send_webhook


workflows:
  version: 2
  build_deploy:
    jobs:
      - build_and_test
      - release_images:
          context: Quality
          requires:
            - build_and_test
          filters:
            branches:
              only: /master|channel\/[\w-]+/