machine:
  environment:
    GOPATH: $GOPATH:$HOME/jadvisor
  services:
    - docker

checkout:
  override:
    - git clone git@github.com:fabric8io/jadvisor.git $HOME/jadvisor/src/github.com/fabric8io/jadvisor

dependencies:
  pre:
    - go get github.com/tools/godep
  override:
    - |
      (cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && [[ "$CIRCLE_BRANCH" = pull/* ]] && git fetch origin $CIRCLE_BRANCH/head:$CIRCLE_BRANCH && git checkout $CIRCLE_BRANCH && git merge --no-ff master && make) || \
      (cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && [[ "$CIRCLE_BRANCH" != pull/* ]] && git checkout $CIRCLE_BRANCH && make)

test:
  override:
    - cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && godep go test ./...

deployment:
  hub:
    branch: master
    owner: fabric8io
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - make image release



machine:
  environment:
    GOPATH: $GOPATH:$HOME/jadvisor
  services:
    - docker

checkout:
  override:
    - git clone git@github.com:fabric8io/jadvisor.git $HOME/jadvisor/src/github.com/fabric8io/jadvisor

dependencies:
  pre:
    - go get github.com/tools/godep
  override:
    - |
      (cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && [[ "$CIRCLE_BRANCH" = pull/* ]] && git fetch origin $CIRCLE_BRANCH/head:$CIRCLE_BRANCH && git checkout $CIRCLE_BRANCH && git merge --no-ff master && make) || \
      (cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && [[ "$CIRCLE_BRANCH" != pull/* ]] && git checkout $CIRCLE_BRANCH && make)

test:
  override:
    - cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && godep go test ./...

deployment:
  hub:
    branch: master
    owner: fabric8io
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - cd $HOME/jadvisor/src/github.com/fabric8io/jadvisor && make image release



Update image creation step on CI
Update image creation step on CI
