box: wercker-labs/docker

build:
  # The steps that will be executed on build
  steps:
    # Sets the go workspace and places you package
    # at the right place in the workspace tree
    - setup-go-workspace

    # Gets the dependencies
    - script:
        name: go get
        code: |
          cd $WERCKER_SOURCE_DIR
          go version
          go get -t ./...

    # Build the project
    - script:
        name: build
        code: |
          make push

    # Test the project
    - script:
        name: go test
        code: |
          go test ./...

box: wercker-labs/docker

build:
  # The steps that will be executed on build
  steps:
    # Sets the go workspace and places you package
    # at the right place in the workspace tree
    - setup-go-workspace

    # Authentication information for docker hub
    - create-file:
      name: Save .dockercfg
      filename: $HOME/.dockercfg
      overwrite: true
      content: $DOCKER_HUB_AUTH

    # Gets the dependencies
    - script:
        name: go get
        code: |
          cd $WERCKER_SOURCE_DIR
          go version
          go get -t ./...

    # Build the project
    - script:
        name: build
        code: |
          make push

    # Test the project
    - script:
        name: go test
        code: |
          go test ./...

Create a dockercfg so it can log into the repo
Create a dockercfg so it can log into the repo
