forked from gruntwork-io/cloud-nuke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
107 lines (99 loc) · 2.49 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
defaults: &defaults
working_directory: /go/src/github.com/gruntwork-io/cloud-nuke
docker:
- image: 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:latest
version: 2
jobs:
install_dependencies:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: /go/src/github.com/gruntwork-io/cloud-nuke
- restore_cache:
keys:
- dep-{{ checksum "Gopkg.lock" }}
- run: dep ensure
- save_cache:
key: dep-{{ checksum "Gopkg.lock" }}
paths:
- /go/src/github.com/gruntwork-io/cloud-nuke/vendor
- persist_to_workspace:
root: .
paths: vendor
test:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: /go/src/github.com/gruntwork-io/cloud-nuke
- run:
command: run-go-tests --circle-ci-2
no_output_timeout: 20m
build:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: /go/src/github.com/gruntwork-io/cloud-nuke
- run: build-go-binaries --circle-ci-2 --app-name cloud-nuke --dest-path bin --ld-flags "-X main.VERSION=$CIRCLE_TAG"
- persist_to_workspace:
root: .
paths: bin
nuke_phx_devops:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: /go/src/github.com/gruntwork-io/cloud-nuke
- run: go run main.go aws --older-than 24h --exclude-region us-west-2 --force
deploy:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: /go/src/github.com/gruntwork-io/cloud-nuke
- run: upload-github-release-assets bin/*
workflows:
version: 2
build-and-test:
jobs:
- install_dependencies:
filters:
tags:
only: /^v.*/
- test:
requires:
- install_dependencies
filters:
tags:
only: /^v.*/
- build:
requires:
- test
filters:
tags:
only: /^v.*/
- deploy:
requires:
- build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
nightly:
triggers:
- schedule:
cron: "0 6 * * *"
filters:
branches:
only: master
jobs:
- install_dependencies
- test:
requires:
- install_dependencies
- nuke_phx_devops:
requires:
- test