master Merge pull request #62 from travis-ci/mjm-instant-clone

Push event #293.1 canceled

  • Ran for
AMD64
Go: 1.11.x
Git
.travis.yml
language: go
go: 1.11.x

env:
  global:
  - UNAME="$(uname | tr '[:upper:]' '[:lower:]')"

addons:
  artifacts:
    paths:
    - './build/$UNAME/amd64/jb-server'
    target_paths:
    - 'travis-ci/jupiter-brain/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER'
    - 'travis-ci/jupiter-brain/$(git describe --always --dirty --tags)'
    - 'travis-ci/jupiter-brain/$TRAVIS_BRANCH'

before_install:
- go get github.com/FiloSottile/gvt

script:
- make deps
- make test
- make test-race
- git diff --exit-code
- git diff --cached --exit-code
- make docker-build

deploy:
  provider: script
  script: utils/docker-push
  # we don't need this for docker, but the artifacts push does
  skip_cleanup: true
  on:
    # push all non-PR builds to Docker Hub
    all_branches: true
    condition: "$TRAVIS_PULL_REQUEST == false"

after_success:
- mkdir -p build/$UNAME/amd64
- cp -v ~/gopath/bin/jb-server build/$UNAME/amd64/jb-server
- echo $ARTIFACTS_PATHS
Build Config
{
  "go": [
    "1.11.x"
  ],
  "os": [
    "linux"
  ],
  "env": {
    "global": [
      "UNAME=\"$(uname | tr '[:upper:]' '[:lower:]')\""
    ]
  },
  "dist": "trusty",
  "addons": {
    "artifacts": {
      "paths": [
        "./build/$UNAME/amd64/jb-server"
      ],
      "enabled": true,
      "target_paths": [
        "travis-ci/jupiter-brain/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER",
        "travis-ci/jupiter-brain/$(git describe --always --dirty --tags)",
        "travis-ci/jupiter-brain/$TRAVIS_BRANCH"
      ]
    }
  },
  "deploy": [
    {
      "on": {
        "condition": "$TRAVIS_PULL_REQUEST == false",
        "all_branches": true
      },
      "script": "utils/docker-push",
      "provider": "script",
      "skip_cleanup": true
    }
  ],
  "script": [
    "make deps",
    "make test",
    "make test-race",
    "git diff --exit-code",
    "git diff --cached --exit-code",
    "make docker-build"
  ],
  "language": "go",
  "after_success": [
    "mkdir -p build/$UNAME/amd64",
    "cp -v ~/gopath/bin/jb-server build/$UNAME/amd64/jb-server",
    "echo $ARTIFACTS_PATHS"
  ],
  "before_install": [
    "go get github.com/FiloSottile/gvt"
  ]
}