Skip to content

Instantly share code, notes, and snippets.

@tnir
Last active June 21, 2017 11:18
Show Gist options
  • Save tnir/782545a33dc13aa07887 to your computer and use it in GitHub Desktop.
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
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()'
- mysql -h mysql -u root -p${MYSQL_ROOT_PASSWORD} -e 'SELECT VERSION()'
services:
- mysql:5.7
variables:
MYSQL_ROOT_PASSWORD: "1iEkou9luj4Etrie"
$ 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