@@ -9,26 +9,26 @@ executors:
9
9
# also be updated.
10
10
golang :
11
11
docker :
12
- - image : circleci/golang:1.13
12
+ - image : circleci/golang:1.13
13
13
14
14
jobs :
15
15
test :
16
16
executor : golang
17
17
18
18
steps :
19
- - prometheus/setup_environment
20
- - run : make
21
- - prometheus/store_artifact :
22
- file : systemd_exporter
19
+ - prometheus/setup_environment
20
+ - run : make
21
+ - prometheus/store_artifact :
22
+ file : systemd_exporter
23
23
24
24
codespell :
25
25
docker :
26
- - image : circleci/python
26
+ - image : circleci/python
27
27
28
28
steps :
29
- - checkout
30
- - run : sudo pip install codespell
31
- - run : codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate
29
+ - checkout
30
+ - run : sudo pip install codespell
31
+ - run : codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate
32
32
33
33
build :
34
34
machine :
@@ -39,64 +39,109 @@ jobs:
39
39
REPO_PATH : github.com/povilasv/systemd_exporter
40
40
41
41
steps :
42
- - checkout
43
- - run : docker run --privileged linuxkit/binfmt:v0.7
44
- - run : make promu
45
- - run : promu crossbuild
46
- - run : promu --config .promu.yml crossbuild
47
- - persist_to_workspace :
48
- root : .
49
- paths :
50
- - .build
51
- - store_artifacts :
52
- path : .build
53
- destination : /build
54
- - run :
55
- command : |
56
- if [ -n "$CIRCLE_TAG" ]; then
57
- make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
58
- else
59
- make docker
60
- fi
61
- - run : docker images
62
- - run : docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
42
+ - checkout
43
+ - run : docker run --privileged linuxkit/binfmt:v0.7
44
+ - run : make promu
45
+ - run : promu crossbuild
46
+ - run : promu --config .promu.yml crossbuild
47
+ - persist_to_workspace :
48
+ root : .
49
+ paths :
50
+ - .build
51
+ - store_artifacts :
52
+ path : .build
53
+ destination : /build
54
+ - run :
55
+ command : |
56
+ if [ -n "$CIRCLE_TAG" ]; then
57
+ make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
58
+ else
59
+ make docker
60
+ fi
61
+ - run : docker images
62
+ - run : docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
63
63
# - run:
64
64
# command: |
65
65
# if [ -n "$CIRCLE_TAG" ]; then
66
66
# make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
67
67
# else
68
68
# make test-docker
69
69
# fi
70
+ publish_master :
71
+ docker :
72
+ - image : circleci/golang:1.13
73
+
74
+ steps :
75
+ - prometheus/setup_build_environment
76
+ - run : promu crossbuild tarballs
77
+ - run : promu checksum .tarballs
78
+ - run : promu release .tarballs
79
+ - store_artifacts :
80
+ path : .tarballs
81
+ destination : releases
82
+ - prometheus/publish_images :
83
+ registry : docker.io
84
+ organization : povilasv
85
+ login_variable : DOCKER_LOGIN
86
+ password_variable : DOCKER_PASSWORD
87
+ - prometheus/publish_images :
88
+ registry : quay.io
89
+ organization : povilasv
90
+ login_variable : QUAY_LOGIN
91
+ password_variable : QUAY_PASSWORD
92
+
93
+ publish_release :
94
+ docker :
95
+ - image : circleci/golang:1.13
96
+
97
+ steps :
98
+ - prometheus/setup_build_environment
99
+ - run : promu crossbuild tarballs
100
+ - run : promu checksum .tarballs
101
+ - run : promu release .tarballs
102
+ - store_artifacts :
103
+ path : .tarballs
104
+ destination : releases
105
+ - prometheus/publish_release_images :
106
+ registry : docker.io
107
+ organization : prom
108
+ login_variable : DOCKER_LOGIN
109
+ password_variable : DOCKER_PASSWORD
110
+ - prometheus/publish_release_images :
111
+ registry : quay.io
112
+ organization : prometheus
113
+ login_variable : QUAY_LOGIN
114
+ password_variable : QUAY_PASSWORD
70
115
71
116
workflows :
72
117
version : 2
73
118
systemd_exporter :
74
119
jobs :
75
- - test :
76
- filters :
77
- tags :
78
- only : /.*/
79
- - build :
80
- filters :
81
- tags :
82
- only : /.*/
83
- - codespell :
84
- filters :
85
- tags :
86
- only : /.*/
87
- - prometheus/ publish_master :
88
- requires :
89
- - test
90
- - build
91
- filters :
92
- branches :
93
- only : master
94
- - prometheus/ publish_release :
95
- requires :
96
- - test
97
- - build
98
- filters :
99
- tags :
100
- only : /^v.*/
101
- branches :
102
- ignore : /.*/
120
+ - test :
121
+ filters :
122
+ tags :
123
+ only : /.*/
124
+ - build :
125
+ filters :
126
+ tags :
127
+ only : /.*/
128
+ - codespell :
129
+ filters :
130
+ tags :
131
+ only : /.*/
132
+ - publish_master :
133
+ requires :
134
+ - test
135
+ - build
136
+ filters :
137
+ branches :
138
+ only : master
139
+ - publish_release :
140
+ requires :
141
+ - test
142
+ - build
143
+ filters :
144
+ tags :
145
+ only : /^v.*/
146
+ branches :
147
+ ignore : /.*/
0 commit comments