github.com/vipernet-xyz/tm@v0.34.24/.circleci/config.yml (about)

     1  version: 2.1
     2  
     3  executors:
     4    golang:
     5      docker:
     6        - image: tendermintdev/docker-tendermint-build
     7      working_directory: /go/src/github.com/vipernet-xyz/tm
     8      environment:
     9        GOBIN: /tmp/bin
    10    release:
    11      machine: true
    12    docs:
    13      docker:
    14        - image: tendermintdev/docker-website-deployment
    15      environment:
    16        AWS_REGION: us-east-1
    17  
    18  commands:
    19    run_test:
    20      parameters:
    21        script_path:
    22          type: string
    23      steps:
    24        - attach_workspace:
    25            at: /tmp/bin
    26        - restore_cache:
    27            name: "Restore source code cache"
    28            keys:
    29              - go-src-v1-{{ .Revision }}
    30        - checkout
    31        - restore_cache:
    32            name: "Restore go modules cache"
    33            keys:
    34              - go-mod-v1-{{ checksum "go.sum" }}
    35        - run:
    36            name: "Running test"
    37            command: |
    38              bash << parameters.script_path >>
    39  jobs:
    40    setup_dependencies:
    41      executor: golang
    42      steps:
    43        - checkout
    44        - restore_cache:
    45            name: "Restore go modules cache"
    46            keys:
    47              - go-mod-v1-{{ checksum "go.sum" }}
    48        - run:
    49            command: |
    50              mkdir -p /tmp/bin
    51        - run:
    52            name: Cache go modules
    53            command: make go-mod-cache
    54        - run:
    55            name: tools
    56            command: make tools
    57        - run:
    58            name: "Build binaries"
    59            command: make install install_abci
    60        - save_cache:
    61            name: "Save go modules cache"
    62            key: go-mod-v1-{{ checksum "go.sum" }}
    63            paths:
    64              - "/go/pkg/mod"
    65        - save_cache:
    66            name: "Save source code cache"
    67            key: go-src-v1-{{ .Revision }}
    68            paths:
    69              - ".git"
    70        - persist_to_workspace:
    71            root: "/tmp/bin"
    72            paths:
    73              - "."
    74  
    75    deploy_docs:
    76      executor: docs
    77      steps:
    78        - checkout
    79        - run:
    80            name: "Pull versions"
    81            command: git fetch origin v0.32 v0.33
    82        - run:
    83            name: "Build docs"
    84            command: make build-docs
    85        - run:
    86            name: "Sync to S3"
    87            command: make sync-docs
    88  
    89    prepare_build:
    90      executor: golang
    91      steps:
    92        - restore_cache:
    93            name: "Restore source code cache"
    94            keys:
    95              - go-src-v1-{{ .Revision }}
    96        - checkout
    97        - run:
    98            name: Get next release number
    99            command: |
   100              export LAST_TAG="`git describe --tags --abbrev=0 --match "${CIRCLE_BRANCH}.*"`"
   101              echo "Last tag: ${LAST_TAG}"
   102              if [ -z "${LAST_TAG}" ]; then
   103                export LAST_TAG="${CIRCLE_BRANCH}"
   104                echo "Last tag not found. Possibly fresh branch or feature branch. Setting ${LAST_TAG} as tag."
   105              fi
   106              export NEXT_TAG="`python -u scripts/release_management/bump-semver.py --version "${LAST_TAG}"`"
   107              echo "Next tag: ${NEXT_TAG}"
   108              echo "export CIRCLE_TAG=\"${NEXT_TAG}\"" > release-version.source
   109        - run:
   110            name: Build dependencies
   111            command: make tools
   112        - persist_to_workspace:
   113            root: .
   114            paths:
   115              - "release-version.source"
   116        - save_cache:
   117            key: v2-release-deps-{{ checksum "go.sum" }}
   118            paths:
   119              - "/go/pkg/mod"
   120  
   121    # # Test RPC implementation against the swagger documented specs
   122    # contract_tests:
   123    #   working_directory: /home/circleci/.go_workspace/src/github.com/vipernet-xyz/tm
   124    #   machine:
   125    #     image: circleci/classic:latest
   126    #   environment:
   127    #     GOBIN: /home/circleci/.go_workspace/bin
   128    #     GOPATH: /home/circleci/.go_workspace/
   129    #     GOOS: linux
   130    #     GOARCH: amd64
   131    #   parallelism: 1
   132    #   steps:
   133    #     - checkout
   134    #     - run:
   135    #         name: Test RPC endpoints against swagger documentation
   136    #         command: |
   137    #           set -x
   138    #           export PATH=~/.local/bin:$PATH
   139    #           # install node and dredd
   140    #           ./scripts/get_nodejs.sh
   141    #           # build the binaries with a proper version of Go
   142    #           docker run --rm -v "$PWD":/go/src/github.com/vipernet-xyz/tm -w /go/src/github.com/vipernet-xyz/tm golang make build-linux build-contract-tests-hooks
   143    #           # This docker image works with go 1.7, we can install here the hook handler that contract-tests is going to use
   144    #           go get github.com/snikch/goodman/cmd/goodman
   145    #           make contract-tests
   146  
   147  workflows:
   148    version: 2
   149    docs:
   150      jobs:
   151        - deploy_docs:
   152            context: tendermint-docs
   153            filters:
   154              branches:
   155                only:
   156                  - master
   157              tags:
   158                only:
   159                  - /^v.*/
   160        - deploy_docs:
   161            context: tendermint-docs-staging
   162            filters:
   163              branches:
   164                only:
   165                  - docs-staging
   166        # - contract_tests:
   167        #     requires:
   168        #       - setup_dependencies