6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Want to use MySQL 5.6 at CircleCI? (Faster version)

Last updated at Posted at 2015-07-16

Add following settings to circle.yml. While well-known existing approaches use apt-get update, this configuration directly fetches and installs deb packages.

CircleCIでMySQL5.6を使うには(高速版)

以下のような設定をするとよいと思います。ググって引っかかる方法でもちゃんと動くんですが、apt-get updateが必要になってしまい、それなりに時間がかかるのでキャッシュしてdpkgでインストールという設定を書きました。ご査収のほど、お願いいたします。

dpkgを二回唱えているのはとても大事だから、ではなくなぜだかわからないんですがそうしないと失敗してしまいます。

なお、もうちょっときれいに書けるだろうとは思っているのですが、もちろんpatches welcomeです。

dependencies:
  cache_directories:
    - "~/deb"
  pre:
    - mkdir -p /home/ubuntu/deb
    - (cd /home/ubuntu/deb; if [ _8cb5bb1bb2fc1e661c60d67be67330b5 != _`md5sum mysql-server-core-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb  |cut -f1 -d " "` ]; then curl -O  http://ppa.launchpad.net/ondrej/mysql-experimental/ubuntu/pool/main/m/mysql-5.6/mysql-server-core-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb; fi)
    - (cd /home/ubuntu/deb; if [ _c2df384f3715ad0e2463b693003ad5f3 != _`md5sum mysql-server-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb  |cut -f1 -d " "` ]; then curl -O  http://ppa.launchpad.net/ondrej/mysql-experimental/ubuntu/pool/main/m/mysql-5.6/mysql-server-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb; fi)
    - (cd /home/ubuntu/deb; if [ _317a22c2d55c6cf0c8e79b3dd1b2353b != _`md5sum mysql-client-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb  |cut -f1 -d " "` ]; then curl -O  http://ppa.launchpad.net/ondrej/mysql-experimental/ubuntu/pool/main/m/mysql-5.6/mysql-client-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb; fi)
    - (cd /home/ubuntu/deb; if [ _ea268ff1fa0dd1000cfe3b8c50d44ce9 != _`md5sum mysql-common_5.6.14+dfsg-1+debphp.org~precise+1_all.deb  |cut -f1 -d " "` ]; then curl -O  http://ppa.launchpad.net/ondrej/mysql-experimental/ubuntu/pool/main/m/mysql-5.6/mysql-common_5.6.14+dfsg-1+debphp.org~precise+1_all.deb; fi)
    - sudo dpkg -r mysql-server-5.5 mysql-server mysql-client-5.5 mysql-client-core-5.5 mysql-server-core-5.5
    - (cd /home/ubuntu/deb; sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-server-core-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb mysql-server-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb mysql-common_5.6.14+dfsg-1+debphp.org~precise+1_all.deb mysql-client-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb || sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-server-core-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb mysql-server-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb mysql-common_5.6.14+dfsg-1+debphp.org~precise+1_all.deb mysql-client-5.6_5.6.14+dfsg-1+debphp.org~precise+1_amd64.deb)
    - sudo service mysql restart
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?