-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
95 lines (73 loc) · 3.38 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
machine:
timezone:
America/Chicago
environment:
ngrok_url: calderadev.ngrok.io
ngork_auth_token: d8NfARcu2wLE1hyeQd9J_6m4RuZQCCoKXJ3etDGnMv
ngork_subdomain: calderadev
php:
version: 7.1.9
# version: 5.5.31
node:
version: 4.6.0
# This will be added to the `/etc/hosts` file
hosts:
calderadev.ngrok.io: 127.0.0.1
general:
artifacts:
- "/var/log/apache2/"
dependencies:
pre:
# Setup and restart apache
# - 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 rm /etc/apache2/mods-enabled/php5.load
- sudo cp ./apache-ci.conf /etc/apache2/sites-available/wordpress.conf
- sudo a2dismod php5
- cd /etc/apache2/sites-available; sudo a2enmod rewrite; sudo service apache2 restart; sudo a2ensite wordpress; sudo service apache2 reload
# No password is required for the MySQL user `ubuntu`
- mysql -e 'CREATE DATABASE wordpress;' -uroot
# Use cURL to fetch WP-CLI
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && chmod +x wp-cli.phar
# Download WordPress into `wordpress` directory
- ./wp-cli.phar core download --allow-root --path=wordpress
# Generate `wp-config.php` file
- ./wp-cli.phar core config --allow-root --dbname=wordpress --dbuser=root --dbuser=root --dbhost=127.0.0.1
# Install WordPress
- ./wp-cli.phar core install --allow-root --admin_name=admin --admin_password=admin [email protected] --title=WordPress
# Permalinks
- ./wp-cli.phar rewrite structure '/%year%/%monthnum%/%postname%/' --hard
- ./wp-cli.phar rewrite flush --hard
# Install Caldera
# - ./wp-cli.phar plugin install caldera-forms --path=wordpress
# Install diff plugin
# - git clone https://gitlab.com/caldera-labs/cf-result-diff-plugin.git wordpress/wp-content/plugins/cf-result-diff-plugin
# - cd wordpress/wp-content/plugins/cf-result-diff-plugin && composer install
# - ./wp-cli.phar plugin activate cf-result-diff-plugin --path=wordpress
# Install cf-connected-forms
# - git clone https://github.com/CalderaWP/cf-connected-forms.git wordpress/wp-content/plugins/cf-connected-forms
# - npm install gulp -g
# - cd wordpress/wp-content/plugins/cf-connected-forms && composer install && npm install && gulp
# Install Ghost runner plugin to home directory
# - git clone https://gitlab.com/caldera-labs/ghostrunner-runner-runner.git
# - cp .env ghost-runner-runner
# - cd ghostrunner-runner-runner/ && npm install
# Activate Plugins
# - ./wp-cli.phar plugin activate caldera-forms
# - ./wp-cli.phar plugin activate cf-connected-forms
# - ./wp-cli.phar plugin activate cf-result-diff-plugin
# Download ngrok and open tunnel to our application
- wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
- unzip ngrok-stable-linux-amd64.zip
- chmod +x ngrok
- ./ngrok authtoken ${ngork_auth_token}
# Download json parser for determining ngrok tunnel
- wget https://stedolan.github.io/jq/download/linux64/jq
- chmod +x jq
post:
- ./ngrok http -subdomain=${ngork_subdomain} 8080:
background: true
test:
override:
# This is just for us to see that the WP Pusher plugin was actually installed and is active
- ./wp-cli.phar plugin list