diff --git a/README.md b/README.md index 9682db0..99bae7c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ -# drupal-circleci +# Drupal for CircleCI An example how to run Behat tests in a Drupal 7 project with CircleCI. + +## Usage +1. Fork repo +1. Install CircleCI from marketpalce https://github.com/marketplace/circleci +1. From CircleCi add forked project https://circleci.com/add-projects/gh/[YOUR-USER-NAME] +1. Clone your forked repo & cd to it +1. Change something in READme.txt & commit & push it +1. Watch progresss on https://circleci.com/gh/[YOUR-USER-NAME] diff --git a/circle.yml b/circle.yml index ce24741..79defce 100644 --- a/circle.yml +++ b/circle.yml @@ -1,14 +1,25 @@ machine: php: - version: 5.5.21 + version: 5.6.22 dependencies: pre: # Set up a virtual host for the site. - - echo "sendmail_path=/bin/true" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "memory_limit=256M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sudo cp circle/circle.conf /etc/apache2/sites-available/default - - sudo sed -e "s?%PROJECT_DIR%?$(pwd)/www?g" --in-place /etc/apache2/sites-available/default + - echo "alias ls='ls --color'" >> ~/.bashrc + - echo "alias ll='ls -l'" >> ~/.bashrc + + # Set php.ini parameters + - echo "sendmail_path=/bin/true" >> /opt/circleci/php/$(phpenv version-name)/etc/php.ini + - echo "memory_limit=256M" >> /opt/circleci/php/$(phpenv version-name)/etc/php.ini + + # Fixing faild build from https://discuss.circleci.com/t/apache2-and-php-missing-libphp5-so/3300/6 + - sudo unlink /usr/lib/apache2/modules/libphp5.so + - sudo ln -s $PHPENV_ROOT/versions/$(phpenv global)/usr/lib/apache2/modules/libphp5.so /usr/lib/apache2/modules/libphp5.so + + - sudo cp circle/circle.conf /etc/apache2/sites-available/default.conf + - sudo sed -e "s?%PROJECT_DIR%?$(pwd)/www?g" --in-place /etc/apache2/sites-available/default.conf + - sudo a2dissite 000-default.conf + - sudo a2ensite default.conf - sudo a2enmod rewrite - sudo service apache2 restart override: @@ -25,10 +36,10 @@ dependencies: - chmod -R +rw www/sites/default/files - cp circle/settings.php www/sites/default/settings.php - sudo chown -R $(whoami):www-data www - - bin/drush -y -r www si standard --site-name=sandbox7 --account-name=admin --account-pass=admin + - bin/drush --yes --root=www site-install standard --site-name=sandbox7 --account-name=admin --account-pass=admin # Set tmp and private file system paths. - - bin/drush -r www vset --exact file_temporary_path "/tmp/sandbox7" - - bin/drush -r www vset --exact file_private_path "/tmp/sandbox7-private" + - bin/drush --yes --root=www vset --exact file_temporary_path "/tmp/sandbox7" + - bin/drush --yes --root=www vset --exact file_private_path "/tmp/sandbox7-private" cache_directories: - vendor - bin diff --git a/circle/circle.conf b/circle/circle.conf index d0ca5b5..875a1ec 100644 --- a/circle/circle.conf +++ b/circle/circle.conf @@ -11,8 +11,7 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule %PROJECT_DIR%/(.*)$ index.php/?q=$1 [L,QSA] - Order allow,deny - Allow from all + Require all granted