-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from devilbox/release-0.7
Ensure to test against common entrypoint
- Loading branch information
Showing
21 changed files
with
363 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
|
||
# ------------------------------------------------------------------------------------------------- | ||
# Job Name | ||
# ------------------------------------------------------------------------------------------------- | ||
name: MYSQL-CI | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
# When to run | ||
# ------------------------------------------------------------------------------------------------- | ||
on: | ||
# Runs on Pull Requests | ||
pull_request: | ||
|
||
# Runs on master Branch and Tags | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '[0-9]+.[0-9]+*' | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------- | ||
# What to run | ||
# ------------------------------------------------------------------------------------------------- | ||
jobs: | ||
build: | ||
name: "[ MYSQL-${{ matrix.version }} ]" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: False | ||
matrix: | ||
version: | ||
- 'mysql-5.5' | ||
- 'mysql-5.6' | ||
- 'mysql-5.7' | ||
- 'mysql-8.0' | ||
- 'mariadb-5.5' | ||
- 'mariadb-10.0' | ||
- 'mariadb-10.1' | ||
- 'mariadb-10.2' | ||
- 'mariadb-10.3' | ||
- 'mariadb-10.4' | ||
- 'mariadb-10.5' | ||
- 'percona-5.5' | ||
- 'percona-5.6' | ||
- 'percona-5.7' | ||
- 'percona-8.0' | ||
steps: | ||
|
||
# ------------------------------------------------------------ | ||
# Checkout repository | ||
# ------------------------------------------------------------ | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# ------------------------------------------------------------ | ||
# Build | ||
# ------------------------------------------------------------ | ||
- name: Build | ||
run: | | ||
retry() { | ||
for n in $(seq ${RETRIES}); do | ||
echo "[${n}/${RETRIES}] ${*}"; | ||
if eval "${*}"; then | ||
echo "[SUCC] ${n}/${RETRIES}"; | ||
return 0; | ||
fi; | ||
sleep 2; | ||
echo "[FAIL] ${n}/${RETRIES}"; | ||
done; | ||
return 1; | ||
} | ||
retry make build-${VERSION} | ||
env: | ||
VERSION: ${{ matrix.version }} | ||
RETRIES: 20 | ||
|
||
# ------------------------------------------------------------ | ||
# Test | ||
# ------------------------------------------------------------ | ||
- name: Test | ||
run: | | ||
retry() { | ||
for n in $(seq ${RETRIES}); do | ||
echo "[${n}/${RETRIES}] ${*}"; | ||
if eval "${*}"; then | ||
echo "[SUCC] ${n}/${RETRIES}"; | ||
return 0; | ||
fi; | ||
sleep 2; | ||
echo "[FAIL] ${n}/${RETRIES}"; | ||
done; | ||
return 1; | ||
} | ||
retry make test-${VERSION} | ||
env: | ||
VERSION: ${{ matrix.version }} | ||
RETRIES: 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
# vi: ft=dockerfile | ||
FROM percona:5.6 | ||
|
||
USER root | ||
RUN set -eux \ | ||
&& mkdir -p /etc/mysql/docker-default.d/ \ | ||
&& if [ -f /etc/my.cnf ]; then \ | ||
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/my.cnf; \ | ||
elif [ -f /etc/mysql/my.cnf ]; then \ | ||
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \ | ||
else \ | ||
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \ | ||
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \ | ||
false; \ | ||
fi | ||
fi \ | ||
&& if [ -f "/entrypoint.sh" ]; then \ | ||
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \ | ||
fi \ | ||
&& if [ ! -f "/docker-entrypoint.sh" ]; then \ | ||
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \ | ||
fi \ | ||
&& chmod +x "/docker-entrypoint.sh" | ||
|
||
USER mysql | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["mysqld"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
# vi: ft=dockerfile | ||
FROM percona:5.7 | ||
|
||
USER root | ||
RUN set -eux \ | ||
&& mkdir -p /etc/mysql/docker-default.d/ \ | ||
&& if [ -f /etc/my.cnf ]; then \ | ||
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/my.cnf; \ | ||
elif [ -f /etc/mysql/my.cnf ]; then \ | ||
echo '!'"includedir /etc/mysql/docker-default.d/" >> /etc/mysql/my.cnf; \ | ||
else \ | ||
echo "/etc/my.cnf and /etc/mysql/my.cnf are not availanle"; \ | ||
echo "/etc/my.cnf and /etc/mysql/my.cnf are not available"; \ | ||
false; \ | ||
fi | ||
fi \ | ||
&& if [ -f "/entrypoint.sh" ]; then \ | ||
mv "/entrypoint.sh" "/docker-entrypoint.sh"; \ | ||
fi \ | ||
&& if [ ! -f "/docker-entrypoint.sh" ]; then \ | ||
ln -s "/usr/local/bin/docker-entrypoint.sh" "/docker-entrypoint.sh"; \ | ||
fi \ | ||
&& chmod +x "/docker-entrypoint.sh" | ||
|
||
USER mysql | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["mysqld"] |
Oops, something went wrong.