Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Add registry_rebuild to CircleCi environment
Browse files Browse the repository at this point in the history
Also delegate circle.yml template writing to ruby. This will help avoid the ^M
chars we are getting when using shell redirect.
  • Loading branch information
Riadh Habbachi committed Feb 9, 2017
1 parent a08e870 commit b6ebee7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .ahoy/site/.scripts/circle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def render(template)

config = YAML.load_file("config/config.yml")
circle_ci_config = CircleCIConfig.new(config)
puts circle_ci_config.render(template);
File.write('circle.yml', circle_ci_config.render(template))
2 changes: 1 addition & 1 deletion .ahoy/site/build.ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ commands:
cmd: |
# render custom .htaccess
ahoy cmd-proxy ruby .ahoy/site/.scripts/htaccess.rb > config/.htaccess
ahoy cmd-proxy ruby .ahoy/site/.scripts/circle.rb > circle.yml
ahoy cmd-proxy ruby .ahoy/site/.scripts/circle.rb
# Transpose config.yml to php
cd .ahoy/site
Expand Down
8 changes: 5 additions & 3 deletions assets/templates/circle.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ machine:
environment:
PATH: $PATH:$HOME/.config/composer/vendor/bin
DATABASE_URL: mysql://ubuntu:@127.0.0.1:3306/circle_test
# Timeouts issues happen when selenium tries to spawn a new chrome
# instance. I've nail that down to this selenium issue
# Timeouts issues happen when selenium tries to spawn a new chrome instance.
# I've nail that down to this selenium issue
# https://github.com/SeleniumHQ/docker-selenium/issues/87
DBUS_SESSION_BUS_ADDRESS: /dev/null
## Customize checkout
## Note: Only post is supported.
checkout:
post:
# Remove the extra composer stuff that circleci loads and that is causing conflicts with drush.
# Remove the extra composer stuff that circleci loads and that is causing
# conflicts with drush.
- rm -rf ~/.composer

## Customize dependencies
Expand All @@ -34,6 +35,7 @@ dependencies:
- mkdir $CIRCLE_ARTIFACTS/junit
- cd tests; composer install; cd ..
- bash dkan/dkan-init.sh dkan --deps-only
- drush dl -n registry_rebuild-7.x
- ahoy site up --db-user=ubuntu --db-pass='' --db-host=127.0.0.1 --db-port=3306 --db-name=circle_test
- ahoy utils fail-when-bad-disable
# Run a webserver using drush.
Expand Down
8 changes: 5 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ machine:
environment:
PATH: $PATH:$HOME/.config/composer/vendor/bin
DATABASE_URL: mysql://ubuntu:@127.0.0.1:3306/circle_test
# Timeouts issues happen when selenium tries to spawn a new chrome
# instance. I've nail that down to this selenium issue
# Timeouts issues happen when selenium tries to spawn a new chrome instance.
# I've nail that down to this selenium issue
# https://github.com/SeleniumHQ/docker-selenium/issues/87
DBUS_SESSION_BUS_ADDRESS: /dev/null
## Customize checkout
## Note: Only post is supported.
checkout:
post:
# Remove the extra composer stuff that circleci loads and that is causing conflicts with drush.
# Remove the extra composer stuff that circleci loads and that is causing
# conflicts with drush.
- rm -rf ~/.composer

## Customize dependencies
Expand All @@ -34,6 +35,7 @@ dependencies:
- mkdir $CIRCLE_ARTIFACTS/junit
- cd tests; composer install; cd ..
- bash dkan/dkan-init.sh dkan --deps-only
- drush dl -n registry_rebuild-7.x
- ahoy site up --db-user=ubuntu --db-pass='' --db-host=127.0.0.1 --db-port=3306 --db-name=circle_test
- ahoy utils fail-when-bad-disable
# Run a webserver using drush.
Expand Down

0 comments on commit b6ebee7

Please sign in to comment.