Skip to content

Commit

Permalink
fix deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
andreilupu committed May 29, 2017
1 parent 9a470bc commit ddaefcb
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
machine:
timezone:
Europe/Copenhagen
node:
version: 7.3.0
php:
version: 5.6.22

Expand All @@ -24,8 +22,6 @@ dependencies:
- "~/patch/wordpress/wp-content/themes/patch/node_modules" # relative to the user's home directory

pre:
- npm install gulp -g

# No password is required for the MySQL user `ubuntu`
- mysql -u ubuntu -e "create database wordpress"

Expand Down Expand Up @@ -65,6 +61,11 @@ dependencies:
- sudo apt-get purge libapache2-mod-php5
- sudo apt-get update && sudo apt-get install libapache2-mod-php5

# Remove phpunit 6 and install the 5.7 version since we are not ready to go for php 7
- wget https://phar.phpunit.de/phpunit-5.7.phar
- chmod +x phpunit-5.7.phar
- sudo mv phpunit-5.7.phar /usr/local/bin/phpunit

post:
# Copy Apache conf into `site-available`
- sudo cp ~/patch/tests/apache-ci.conf /etc/apache2/sites-available
Expand All @@ -79,21 +80,15 @@ test:
override:
- sudo mkdir -p $CIRCLE_TEST_REPORTS/phpunit

# This is just for us to see that the WP Pusher plugin was actually installed and is active
# - ./wp-cli.phar plugin list --path=wordpress
# Finally, run our Behat features
- cd wordpress/wp-content/themes/patch/tests; phpunit --log-junit $CIRCLE_TEST_REPORTS/phpunit/junit.xml

deployment:
test:
branch: test
commands:
- sh ./circle_scripts/deploy_test.sh
- sleep 15 # need to wait a few secs, because the commit won't have effects instantly on server
- curl https://test.demos.pixelgrade.com/git-webhook.php
- sh ./circle_scripts/deploy_test.sh && sleep 10 && curl https://test.demos.pixelgrade.com/git-webhook.php # need to wait a few secs, because the commit won't have effects instantly on server
production:
branch: master
commands:
- sh ./circle_scripts/deploy_production.sh
- sleep 15 # need to wait a few secs, because the commit won't have effects instantly on server
- curl https://demos.pixelgrade.com/git-webhook.php
- sh ./circle_scripts/deploy_production.sh && sleep 10 && curl https://demos.pixelgrade.com/git-webhook.php # need to wait a few secs, because the commit won't have effects instantly on server

0 comments on commit ddaefcb

Please sign in to comment.