2017-03-20 18:21:26 +13:00
|
|
|
#!/bin/bash
|
2017-03-24 09:57:41 +13:00
|
|
|
|
|
|
|
sudo docker rm -f devmysql
|
|
|
|
sudo docker rm -f plugindevwp
|
|
|
|
sudo docker rm -f seleniumserver
|
|
|
|
sudo docker build -t leonstafford/wordpress-static-html-plugin:latest .
|
|
|
|
sudo docker run --name seleniumserver -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:latest
|
|
|
|
sudo docker run --name devmysql -e MYSQL_ROOT_PASSWORD=banana -d mariadb
|
|
|
|
sudo docker run --name plugindevwp --link devmysql:mysql -p 8080:80 -d -v $(pwd):/app leonstafford/wordpress-static-html-plugin
|
|
|
|
sudo docker exec plugindevwp sh /post_launch.sh
|
|
|
|
|
2017-03-20 18:58:48 +13:00
|
|
|
echo 'what is running now?'
|
2017-03-24 09:57:41 +13:00
|
|
|
sudo docker ps
|
2017-03-20 18:21:26 +13:00
|
|
|
|
2017-03-23 18:51:45 +13:00
|
|
|
webContainerID=$(sudo docker ps | grep plugindevwp | grep -o -e '^\S*')
|
|
|
|
sqlContainerID=$(sudo docker ps | grep devmysql | grep -o -e '^\S*')
|
|
|
|
seleniumContainerID=$(sudo docker ps | grep seleniumserver | grep -o -e '^\S*')
|
2017-03-20 18:21:26 +13:00
|
|
|
|
2017-03-23 18:51:45 +13:00
|
|
|
webContainerIP=$( sudo docker inspect --format="{{ .NetworkSettings.IPAddress }}" $webContainerID)
|
|
|
|
sqlContainerIP=$( sudo docker inspect --format="{{ .NetworkSettings.IPAddress }}" $sqlContainerID)
|
|
|
|
seleniumContainerIP=$( sudo docker inspect --format="{{ .NetworkSettings.IPAddress }}" $seleniumContainerID)
|
|
|
|
|
|
|
|
echo $webContainerIP
|
|
|
|
echo $sqlContainerIP
|
|
|
|
echo $seleniumContainerIP
|
2017-03-20 18:21:26 +13:00
|
|
|
|
2017-03-20 18:52:52 +13:00
|
|
|
gem install bundler
|
|
|
|
bundle install
|
2017-03-24 09:57:41 +13:00
|
|
|
bundle exec ruby run_tests.rb $webContainerIP
|