Last active
June 21, 2017 11:18
-
-
Save tnir/782545a33dc13aa07887 to your computer and use it in GitHub Desktop.
GitLab CI (docker) でCentOSイメージを使う例(GitLab CI入門) ref: http://qiita.com/tnir/items/ff94ba31157f254a9783
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
before_script: | |
- /bin/echo Testing... CentOS 6.6 x MySQL 5.6.17 | |
- /bin/echo Testing... CentOS 7 latest x MySQL 5.7 latest | |
variables: | |
MYSQL_ROOT_PASSWORD: "1iEkou9luj4Etrie" | |
test:centos6xmysql56: | |
image: centos:6.6 | |
services: | |
- mysql:5.6.17 | |
script: | |
- rpm -q centos-release | |
- yum install -y mysql | |
- mysql --version | |
- mysql -h mysql -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT VERSION()' | |
test:centos7xmysql57: | |
image: centos:7 | |
services: | |
- mysql:5.7 | |
script: | |
- rpm -q centos-release | |
- yum install -y mysql | |
- mysql --version | |
- mysql -h mysql -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT VERSION()' |
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
- mysql -h mysql -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT VERSION()' |
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
services: | |
- mysql:5.7 |
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
variables: | |
MYSQL_ROOT_PASSWORD: "1iEkou9luj4Etrie" |
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
$ rpm -q centos-release | |
centos-release-7-2.1511.el7.centos.2.10.x86_64 | |
$ yum install -y mysql | |
[...] | |
$ mysql --version | |
mysql Ver 15.1 Distrib 5.5.44-MariaDB, for Linux (x86_64) using readline 5.1 | |
$ mysql -h mysql -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT VERSION()' | |
VERSION() | |
5.6.29 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment