Skip to content

Commit cecdaea

Browse files
committed
Switch CircleCI to remote docker
Use remote docker rather than machine image and docker-compose to run integration tests. * Update MariaDB supported versions. Signed-off-by: Ben Kochie <superq@gmail.com>
1 parent b5c752e commit cecdaea

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

.circleci/config.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: 2.1
33

44
orbs:
5-
prometheus: prometheus/prometheus@0.5.0
5+
prometheus: prometheus/prometheus@0.8.0
66

77
executors:
88
# Whenever the Go version is updated here, .promu.yml
@@ -22,23 +22,24 @@ jobs:
2222
file: mysqld_exporter
2323

2424
integration:
25-
machine:
26-
image: ubuntu-1604:202004-01
25+
docker:
26+
- image: circleci/golang:1.15
27+
- image: << parameters.mysql_image >>
28+
environment:
29+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
30+
MYSQL_ROOT_HOST: '%'
2731

2832
parameters:
2933
mysql_image:
3034
type: string
3135

3236
steps:
3337
- checkout
38+
- setup_remote_docker
3439
- run: docker version
3540
- run: docker-compose --version
3641
- 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+
- run: make test
4243

4344
codespell:
4445
docker:
@@ -74,10 +75,10 @@ workflows:
7475
- mysql/mysql-server:5.6
7576
- mysql/mysql-server:5.7
7677
- mysql/mysql-server:8.0
77-
- mariadb:10.1
7878
- mariadb:10.2
7979
- mariadb:10.3
8080
- mariadb:10.4
81+
- mariadb:10.5
8182
- prometheus/build:
8283
name: build
8384
filters:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Prometheus exporter for MySQL server metrics.
99

1010
Supported versions:
1111
* MySQL >= 5.6.
12-
* MariaDB >= 10.1
12+
* MariaDB >= 10.2
1313

1414
NOTE: Not all collection methods are supported on MySQL/MariaDB < 5.6
1515

collector/exporter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ func TestGetMySQLVersion(t *testing.T) {
8383
convey.So(err, convey.ShouldBeNil)
8484
defer db.Close()
8585

86-
convey.So(getMySQLVersion(db, logger), convey.ShouldBeBetweenOrEqual, 5.6, 10.4)
86+
convey.So(getMySQLVersion(db, logger), convey.ShouldBeBetweenOrEqual, 5.6, 10.5)
8787
})
8888
}

docker-compose.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)