-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcircle.yml
49 lines (46 loc) · 1.2 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
defaults: &defaults
working_directory: /go/src/github.com/packetloop/terraform-provider-singularity
docker:
# specify the version
- image: circleci/golang:1.12
environment:
GO111MODULE: "ON"
jobs:
test:
<<: *defaults
steps:
- checkout
- run: make dep
- run: HOST=localhost PORT=443 TF_ACC= make test
deploy:
<<: *defaults
steps:
- checkout
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
test-n-deploy:
jobs:
# a job must have a filters tags section to run as a part of a tag push and
# all its transitively dependent jobs must also have a filters tags section.
# ^ This is key, test must have tag filters since deploy requires it.
- test:
context: ops
filters:
tags:
only: /.*/
branches:
only: /.*/
- deploy:
context: ops
requires:
- test
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
branches:
ignore: /.*/