Skip to content

Commit

Permalink
Merge branch 'develop' for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtamuli committed Jul 23, 2018
2 parents d0f2214 + 128bdda commit 71fa9c5
Show file tree
Hide file tree
Showing 12 changed files with 1,027 additions and 27 deletions.
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
sudo: required

language: php
php: 7.1

env:
global:
- TEST_COMMAND=$(echo $TRAVIS_REPO_SLUG | cut -d/ -f 2) # Get command name to be tested

before_script:
- |
# Remove Xdebug for a huge performance increase:
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- ./ci/prepare.sh
- ./ci/add-test-certs.sh

script:
- cd "$TRAVIS_BUILD_DIR/../easyengine"
- ./vendor/bin/behat

after_script:
- cat /opt/easyengine/ee.log

cache:
directories:
- $HOME/.composer/cache

notifications:
email:
on_success: never
on_failure: change
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
Performs basic site functions in easyengine.

`site` command contains following subcommand
* [ee site create](#ee-site-create)
* [ee site delete](#ee-site-delete)
* [ee site disable](#ee-site-disable)
* [ee site enable](#ee-site-enable)
* [ee site info](#ee-site-info)
* [ee site list](#ee-site-list)
* [ee site start](#ee-site-start)
* [ee site stop](#ee-site-stop)
* [ee site restart](#ee-site-restart)
* [ee site reload](#ee-site-reload)

#### ee site create
* [create](#ee-site-create)
* [delete](#ee-site-delete)
* [disable](#ee-site-disable)
* [enable](#ee-site-enable)
* [info](#ee-site-info)
* [list](#ee-site-list)
* [start](#ee-site-start)
* [stop](#ee-site-stop)
* [restart](#ee-site-restart)
* [reload](#ee-site-reload)

## create
Runs the site creation.

```bash
Expand All @@ -36,36 +36,36 @@ ee site create example.com --wpredis --le # install wordpress with page ca
ee site create example.com --wpsubdom --le # install wordpress wpmu-subdomain + wildcard letsencrypt ssl
```

#### ee site delete
## delete
Deletes an existing EasyEngine site including the webroot and the database.

```bash
ee site delete example.com # Asks for confirmation.
ee site delete example.com --yes # Skips the confirmation prompt.
```

#### ee site disable
## disable
Disables a website. It will stop all containers which will free up resources used by this site. The site's data stored in the disk will still be safe.

```bash
ee site disable example.com
```

#### ee site enable
## enable
Enables a website. It will start the docker containers of the website if they are stopped.

```bash
ee site enable example.com
```

#### ee site info
## info
Display all the relevant site information, credentials and useful links.

```bash
ee site info example.com
```

#### ee site list
## list
Lists the created websites.

```bash
Expand All @@ -75,31 +75,31 @@ ee site list --enabled # List enabled sites
ee site list --disabled # List disabled sites
```

#### ee site start
## start
Starts services associated with site.

```bash
ee site start example.com # Defaults to all services
ee site start example.com --nginx
```

#### ee site stop
## stop
Stops services associated with site.

```bash
ee site stop example.com # Defaults to all services
ee site stop example.com --mailhog
```

#### ee site restart
## restart
Restarts containers associated with site. This action will have a few seconds of downtime.

```bash
ee site restart example.com # Defaults to all services
ee site restart example.com --nginx
```

#### ee site reload
## reload
Reload services in containers without restarting container(s) associated with site.

```bash
Expand Down
106 changes: 106 additions & 0 deletions ci/add-test-certs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#!/usr/bin/env bash
sudo mkdir -p /opt/easyengine/nginx/certs

cat <<EOF | sudo tee /opt/easyengine/nginx/certs/example2.test.crt
-----BEGIN CERTIFICATE-----
MIIDAzCCAeugAwIBAgIJAOfjYN/2twJzMA0GCSqGSIb3DQEBBQUAMBgxFjAUBgNV
BAMMDWV4YW1wbGUyLnRlc3QwHhcNMTgwNzEzMDgyMzEwWhcNMjgwNzEwMDgyMzEw
WjAYMRYwFAYDVQQDDA1leGFtcGxlMi50ZXN0MIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEA4nSZucxge7AoPQAT9x6q9wd99/Of/5Pg9wimq9F/hI41jKT/
Go24Cjz4+qlBk1vhT9huGfGPvtU939mkEdbtuvYX1qft2LEDK/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7d+xvmzCEzaLFp2AsmZmvN3s3I4qUdOwSm9f2ajArUPURSybpnYoCdXvdbIWDqm
v2jtxi0CgYEA+8ZHD07LVijalFaSc+IyOkpqs2ON3C7laljtd/tw2L5vC4gxggwC
TkXNrJWAt/4icbc/SXjBcHF8f4Wkz7TVuKuA14XJYO2QMeFzB/wjuHam2cF6NWf0
Z6hSEfU+ez1VaFs3tLHSMz7sRLX/3A0AKA6TKEH9UFh/6uRCCNYlyXsCgYEAyYXA
NcHPZoWKBcKIAe4pLBDOZgkO/V5CBJ8R38TIizOJWjnzCuIyG60bq/7uVegGeWHr
8Ajzz4rKSkmoiCXzT1s50/i7u5W9OUC9QaQYjR1FcoK543f77lZZ7RVhmHw9bACu
iXDQQMUeTv2OJnjDghAwa2ML92vm3u76zCrEEhMCgYATqm4cfPwW88P2+DgiQxXH
Rc7Fyk3nV+ZlgyKxT3uGAoHr9axgSw3XDU6+X0MZnAkWtsiDtaHuZX7i+w5fhvF2
pja/Ht0W7BdqPgDdK82id+oacilYiJEnk5ctfelueOD18MIOJCGWDSEpUMn2ZzGO
72yBJX5iyzbaow+hXxC+hwKBgEQ4fSs1oyqHxoPQqQ5OO63pOpYcNvDa+epqlzhz
e5h0J+ldeMOUc3YfEiEVukVmuNpape6qeS8nQvgHG4CLqGSS826o45TLSjWZjvgr
vwv2fs4XJyq0MZsrrGGwPUvLs1dem7d3c2iZ0nrXJ0oq07SyGlIgQ6rM4mlR6aE4
UQv1AoGAPgI7RDJcqXMwG7CyIboLTyPRWsFfhN1nlALP1URK61kAkxgBusg45GEa
k8hTB9lhcWDTbL/GVHn5JWxn8ytLPZiDR2RbJtE/Z1bagROANrFYjqJib8lyFhvt
HYXONl5W77CPrYjOLD+Q9ZXjYYvtAxnqFNXicRMPti7Sre9SkRo=
-----END RSA PRIVATE KEY-----
EOF
28 changes: 28 additions & 0 deletions ci/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# called by Travis CI

# install dependencies
wget -qO ee https://rt.cx/ee4beta && sudo bash ee
rm ee

# Setup EE develop repo
cd ..
git clone https://github.com/EasyEngine/easyengine.git easyengine --depth=1
cd easyengine
echo 'travis_test' > VERSION

# Copy tests to EE repo
rm -r features
cp -R ../$TEST_COMMAND/features .

# Install composer dependencies and update them for tests
composer update

# Place the command inside EE repo
rm -r vendor/easyengine/$TEST_COMMAND
cp -R ../$TEST_COMMAND vendor/easyengine/

# Create phar and test it
php -dphar.readonly=0 ./utils/make-phar.php easyengine.phar --quite > /dev/null
sudo php easyengine.phar cli info
Loading

0 comments on commit 71fa9c5

Please sign in to comment.