Skip to content

Instantly share code, notes, and snippets.

@azihsoyn
Created March 23, 2018 12:59

Revisions

  1. azihsoyn created this gist Mar 23, 2018.
    27 changes: 27 additions & 0 deletions circle.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    version: 2
    jobs:
    build:
    working_directory: /go/src/github.com/your_company/your_app
    docker:
    - image: circleci/golang:1.10.0
    environment:
    - DEP_VERSION: 0.4.1
    steps:
    - run: git config --global url.ssh://git@github.com/your_company.insteadOf https://github.com/your_company
    - checkout
    - restore_cache:
    key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
    paths:
    - /go/src/github.com/your_company/your_app/vendor
    - run:
    name: download-libraries
    command: |
    if [ ! -d /go/src/github.com/your_company/your_app/vendor ]; then
    curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o /go/bin/dep
    chmod +x /go/bin/dep
    /go/bin/dep ensure
    fi
    - save_cache:
    key: gopkg-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
    paths:
    - /go/src/github.com/your_company/your_app/vendor