mc-router/.circleci/config.yml

71 lines
1.5 KiB
YAML
Raw Normal View History

2018-05-10 01:37:15 +02:00
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
defaults: &defaults
docker:
# specify the version
- image: circleci/golang:1.10
working_directory: /go/src/github.com/itzg/mc-router
jobs:
build:
<<: *defaults
steps:
- checkout
2018-05-10 01:45:11 +02:00
- restore_cache:
keys:
- cache-{{ arch }}-{{ .Branch }}-{{ checksum "glide.lock" }}
2018-05-10 01:45:11 +02:00
- cache-{{ arch }}-{{ .Branch }}
- cache
2018-05-26 19:35:11 +02:00
- run:
2018-05-26 19:42:41 +02:00
name: Install dependency management
command: make install-dep-mgmt
- run:
2018-05-26 19:37:48 +02:00
name: Install dependencies
2018-05-26 19:42:41 +02:00
command: make vendor
2018-05-10 01:45:11 +02:00
- save_cache:
key: cache-{{ arch }}-{{ .Branch }}-{{ checksum "glide.lock" }}
2018-05-10 01:45:11 +02:00
paths:
- vendor
2018-05-10 01:37:15 +02:00
- run: make test
release:
<<: *defaults
steps:
- checkout
2018-05-26 19:35:11 +02:00
- run:
2018-05-26 19:42:41 +02:00
name: Install dependency management
command: make install-dep-mgmt
- run:
2018-05-26 19:37:48 +02:00
name: Install dependencies
2018-05-26 19:42:41 +02:00
command: make vendor
2018-05-10 01:42:41 +02:00
- setup_remote_docker
- run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin
2018-05-10 01:37:15 +02:00
- run: make release
workflows:
version: 2
incremental:
jobs:
- build:
filters:
tags:
2018-05-10 01:42:41 +02:00
ignore: /^\d+\.\d+\.\d+/
release:
2018-05-10 01:37:15 +02:00
jobs:
- release:
filters:
tags:
2018-05-10 01:42:41 +02:00
only: /^\d+\.\d+\.\d+/
branches:
ignore: /.*/