Created
December 14, 2018 01:25
-
-
Save hoangvx/f79a5c74834a1b710c024cc6aba3ead8 to your computer and use it in GitHub Desktop.
AWS codebuild for rails with mariadb ( ruby:2.5.1 )
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
version: 0.2 | |
env: | |
variables: | |
RAILS_ENV: test | |
RDS_USER: root | |
RDS_PASSWORD: docker | |
RDS_DB_NAME: ap_test | |
phases: | |
install: | |
commands: | |
- apt-get update -y | |
- apt-get install software-properties-common -y | |
- apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db | |
- add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.3/ubuntu trusty main' | |
- apt update -y | |
- export DEBIAN_FRONTEND="noninteractive" | |
- echo "mariadb-server mysql-server/root_password password ${RDS_PASSWORD}" |debconf-set-selections | |
- echo "mariadb-server mysql-server/root_password_again password ${RDS_PASSWORD}" |debconf-set-selections | |
- apt install -y mariadb-server nodejs | |
- service mysql start | |
pre_build: | |
commands: | |
- bundle install | |
- bundle exec rails db:setup | |
build: | |
commands: | |
- bundle exec rspec | |
post_build: | |
commands: | |
- echo 'Test completed!' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment