machine:
  services:
    - docker
  environment:
    # Pushing to adapter-go until this is tested, then it will replace the
    # existing repo on Docker. I can't just push a new tag on the existing
    # because it's a trusted build.
    IMAGE_NAME: centurylink/panamax-kubernetes-adapter-go
    IMAGE_TAG: qa


general:
  artifacts:
    - "panamax-kubernetes-adapter-go" # the built binary

dependencies:
  override:
    - docker pull centurylink/golang-tester:latest
    - docker pull centurylink/golang-builder:latest

test:
  override:
    - docker run -v $(pwd):/src centurylink/golang-tester

deployment:
  hub:
    branch: master
    owner: CenturyLinkLabs
    commands:
      - docker run -v $(pwd):/src centurylink/golang-builder:latest
      - docker build -t $IMAGE_NAME:$IMAGE_TAG .
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push $IMAGE_NAME:$IMAGE_TAG

machine:
  services:
    - docker
  environment:
    IMAGE_NAME: centurylink/panamax-kubernetes-adapter
    IMAGE_TAG: qa


general:
  artifacts:
    - "panamax-kubernetes-adapter-go" # the built binary

dependencies:
  override:
    - docker pull centurylink/golang-tester:latest
    - docker pull centurylink/golang-builder:latest

test:
  override:
    - docker run -v $(pwd):/src centurylink/golang-tester

deployment:
  hub:
    branch: master
    owner: CenturyLinkLabs
    commands:
      - docker run -v $(pwd):/src centurylink/golang-builder:latest
      - docker build -t $IMAGE_NAME:$IMAGE_TAG .
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push $IMAGE_NAME:$IMAGE_TAG

Update Circle to push to production docker repository.
Update Circle to push to production docker repository.

There were some shenangans with the normal repo being a trusted build
and not allowing manual pushes.
