Skip to content

Commit b93e411

Browse files
authored
Merge pull request #9 from devilbox/release-0.7
Ensure to test against common entrypoint
2 parents b7d950e + 40128b0 commit b93e411

21 files changed

Lines changed: 363 additions & 54 deletions

.github/workflows/mysql-ci.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: MYSQL-CI
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
# Runs on Pull Requests
14+
pull_request:
15+
16+
# Runs on master Branch and Tags
17+
push:
18+
branches:
19+
- master
20+
tags:
21+
- '[0-9]+.[0-9]+*'
22+
23+
24+
# -------------------------------------------------------------------------------------------------
25+
# What to run
26+
# -------------------------------------------------------------------------------------------------
27+
jobs:
28+
build:
29+
name: "[ MYSQL-${{ matrix.version }} ]"
30+
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: False
33+
matrix:
34+
version:
35+
- 'mysql-5.5'
36+
- 'mysql-5.6'
37+
- 'mysql-5.7'
38+
- 'mysql-8.0'
39+
- 'mariadb-5.5'
40+
- 'mariadb-10.0'
41+
- 'mariadb-10.1'
42+
- 'mariadb-10.2'
43+
- 'mariadb-10.3'
44+
- 'mariadb-10.4'
45+
- 'mariadb-10.5'
46+
- 'percona-5.5'
47+
- 'percona-5.6'
48+
- 'percona-5.7'
49+
- 'percona-8.0'
50+
steps:
51+
52+
# ------------------------------------------------------------
53+
# Checkout repository
54+
# ------------------------------------------------------------
55+
- name: Checkout repository
56+
uses: actions/checkout@v2
57+
58+
# ------------------------------------------------------------
59+
# Build
60+
# ------------------------------------------------------------
61+
- name: Build
62+
run: |
63+
retry() {
64+
for n in $(seq ${RETRIES}); do
65+
echo "[${n}/${RETRIES}] ${*}";
66+
if eval "${*}"; then
67+
echo "[SUCC] ${n}/${RETRIES}";
68+
return 0;
69+
fi;
70+
sleep 2;
71+
echo "[FAIL] ${n}/${RETRIES}";
72+
done;
73+
return 1;
74+
}
75+
retry make build-${VERSION}
76+
env:
77+
VERSION: ${{ matrix.version }}
78+
RETRIES: 20
79+
80+
# ------------------------------------------------------------
81+
# Test
82+
# ------------------------------------------------------------
83+
- name: Test
84+
run: |
85+
retry() {
86+
for n in $(seq ${RETRIES}); do
87+
echo "[${n}/${RETRIES}] ${*}";
88+
if eval "${*}"; then
89+
echo "[SUCC] ${n}/${RETRIES}";
90+
return 0;
91+
fi;
92+
sleep 2;
93+
echo "[FAIL] ${n}/${RETRIES}";
94+
done;
95+
return 1;
96+
}
97+
retry make test-${VERSION}
98+
env:
99+
VERSION: ${{ matrix.version }}
100+
RETRIES: 20

Dockerfiles/mariadb-10.0

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mariadb-10.1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mariadb-10.2

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mariadb-10.3

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mariadb-10.4

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mariadb-10.5

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mariadb-5.5

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mysql-5.5

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

Dockerfiles/mysql-5.6

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ RUN set -eux \
88
elif [ -f /etc/mysql/my.cnf ]; then \
99
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \
1010
else \
11-
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \
11+
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \
1212
false; \
13-
fi
13+
fi \
14+
&& if [ -f "/entrypoint.sh" ]; then \
15+
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \
16+
fi \
17+
&& if [ ! -f "/docker-entrypoint.sh" ]; then \
18+
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \
19+
fi \
20+
&& chmod +x "/docker-entrypoint.sh"
21+
22+
ENTRYPOINT ["/docker-entrypoint.sh"]
23+
CMD ["mysqld"]

0 commit comments

Comments
 (0)