Public | Automated Build

Last pushed: a year ago
Short Description
Consolidated CI behavior within a docker container
Full Description

patrick

Consolidated CI behavior within a docker container.

  • Pull: Use CircleCI's API to find the latest successful build on either the current
    branch or master and pull down the corresponding docker image

  • Push: Push the built image to specified docker registries

Usage

Usage: patrick <command> [options]

Commands:
  pull                     Pull docker image from latest successful build
  push [gcr] [replicated]  Push image to docker registries
  *                        Run any Makefile target

Example

$ docker run --rm \
    --env CIRCLE_BRANCH \
    --env CIRCLE_PROJECT_REPONAME \
    --env CIRCLE_TOKEN \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    codeclimate/patrick pull

Sample .circle.yml additions

dependencies:
  override:
    - >
      docker run
      --env CIRCLE_BRANCH
      --env CIRCLE_PROJECT_REPONAME
      --env CIRCLE_TOKEN
      --env GCR_JSON_KEY
      --volume /var/run/docker.sock:/var/run/docker.sock
      codeclimate/patrick pull

deployment:
  registry:
    branch: master
    commands:
      - >
        docker run
        --env CIRCLE_BUILD_NUM
        --env CIRCLE_PROJECT_REPONAME
        --env GCR_JSON_KEY
        --env REPLICATED_PASSWORD
        --volume /var/run/docker.sock:/var/run/docker.sock
        codeclimate/patrick push gcr replicated
Docker Pull Command
Owner
codeclimate
Source Repository

Comments (0)