|
1 | 1 | --- |
2 | 2 | version: 2.1 |
3 | | - |
4 | 3 | orbs: |
5 | | - prometheus: prometheus/[email protected] |
6 | | - |
| 4 | + prometheus: prometheus/[email protected] |
7 | 5 | executors: |
8 | 6 | # Whenever the Go version is updated here, .promu.yml |
9 | 7 | # should also be updated. |
10 | 8 | golang: |
11 | 9 | docker: |
12 | | - - image: circleci/golang:1.14 |
13 | | - |
| 10 | + - image: circleci/golang:1.17 |
14 | 11 | jobs: |
15 | 12 | test: |
16 | 13 | executor: golang |
17 | | - |
18 | 14 | steps: |
19 | | - - prometheus/setup_environment |
20 | | - - run: make check_license style staticcheck unused build test-short |
21 | | - - prometheus/store_artifact: |
22 | | - file: mysqld_exporter |
23 | | - |
| 15 | + - prometheus/setup_environment |
| 16 | + - run: make check_license style staticcheck unused build test-short |
| 17 | + - prometheus/store_artifact: |
| 18 | + file: mysqld_exporter |
24 | 19 | integration: |
25 | | - machine: |
26 | | - image: ubuntu-1604:202004-01 |
27 | | - |
| 20 | + docker: |
| 21 | + - image: circleci/golang:1.16 |
| 22 | + - image: << parameters.mysql_image >> |
| 23 | + environment: |
| 24 | + MYSQL_ALLOW_EMPTY_PASSWORD: yes |
| 25 | + MYSQL_ROOT_HOST: '%' |
28 | 26 | parameters: |
29 | 27 | mysql_image: |
30 | 28 | type: string |
31 | | - |
32 | 29 | steps: |
33 | | - - checkout |
34 | | - - run: docker version |
35 | | - - run: docker-compose --version |
36 | | - - run: make build |
37 | | - - run: |
38 | | - name: Run integration test |
39 | | - command: | |
40 | | - MYSQL_IMAGE=<< parameters.mysql_image >> docker-compose up -d |
41 | | - make test |
42 | | -
|
| 30 | + - checkout |
| 31 | + - setup_remote_docker |
| 32 | + - run: docker version |
| 33 | + - run: docker-compose --version |
| 34 | + - run: make build |
| 35 | + - run: make test |
43 | 36 | codespell: |
44 | 37 | docker: |
45 | | - - image: circleci/python |
46 | | - |
| 38 | + - image: circleci/python |
| 39 | + steps: |
| 40 | + - checkout |
| 41 | + - run: sudo pip install codespell |
| 42 | + - run: codespell --skip=".git,./vendor,ttar,Makefile.common" -L uint,ist,keypair |
| 43 | + mixin: |
| 44 | + executor: golang |
47 | 45 | steps: |
48 | | - - checkout |
49 | | - - run: sudo pip install codespell |
50 | | - - run: codespell --skip=".git,./vendor,ttar,Makefile.common" -L uint,ist,keypair |
51 | | - |
| 46 | + - checkout |
| 47 | + - run: go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest |
| 48 | + - run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest |
| 49 | + - run: make -C mysqld-mixin lint build |
52 | 50 | workflows: |
53 | 51 | version: 2 |
54 | 52 | mysqld_exporter: |
55 | 53 | jobs: |
56 | | - - test: |
57 | | - filters: |
58 | | - tags: |
59 | | - only: /.*/ |
60 | | - - integration: |
61 | | - matrix: |
62 | | - parameters: |
63 | | - mysql_image: |
64 | | - - mysql/mysql-server:5.6 |
65 | | - - mysql/mysql-server:5.7 |
66 | | - - mysql/mysql-server:8.0 |
67 | | - - mariadb:10.1 |
68 | | - - mariadb:10.2 |
69 | | - - mariadb:10.3 |
70 | | - - mariadb:10.4 |
71 | | - - prometheus/build: |
72 | | - name: build |
73 | | - filters: |
74 | | - tags: |
75 | | - only: /.*/ |
76 | | - - codespell: |
77 | | - filters: |
78 | | - tags: |
79 | | - only: /.*/ |
80 | | - - prometheus/publish_master: |
81 | | - context: org-context |
82 | | - requires: |
83 | | - - test |
84 | | - - build |
85 | | - filters: |
86 | | - branches: |
87 | | - only: master |
88 | | - - prometheus/publish_release: |
89 | | - context: org-context |
90 | | - requires: |
91 | | - - test |
92 | | - - build |
93 | | - filters: |
94 | | - tags: |
95 | | - only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ |
96 | | - branches: |
97 | | - ignore: /.*/ |
| 54 | + - test: |
| 55 | + filters: |
| 56 | + tags: |
| 57 | + only: /.*/ |
| 58 | + - integration: |
| 59 | + matrix: |
| 60 | + parameters: |
| 61 | + mysql_image: |
| 62 | + - mysql/mysql-server:5.6 |
| 63 | + - mysql/mysql-server:5.7.33 |
| 64 | + - mysql/mysql-server:8.0 |
| 65 | + - mariadb:10.2 |
| 66 | + - mariadb:10.3 |
| 67 | + - mariadb:10.4 |
| 68 | + - mariadb:10.5 |
| 69 | + - prometheus/build: |
| 70 | + name: build |
| 71 | + filters: |
| 72 | + tags: |
| 73 | + only: /.*/ |
| 74 | + - codespell: |
| 75 | + filters: |
| 76 | + tags: |
| 77 | + only: /.*/ |
| 78 | + - mixin: |
| 79 | + filters: |
| 80 | + tags: |
| 81 | + only: /.*/ |
| 82 | + - prometheus/publish_main: |
| 83 | + context: org-context |
| 84 | + requires: |
| 85 | + - test |
| 86 | + - build |
| 87 | + filters: |
| 88 | + branches: |
| 89 | + only: main |
| 90 | + - prometheus/publish_release: |
| 91 | + context: org-context |
| 92 | + requires: |
| 93 | + - test |
| 94 | + - build |
| 95 | + filters: |
| 96 | + tags: |
| 97 | + only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ |
| 98 | + branches: |
| 99 | + ignore: /.*/ |
0 commit comments