Continuous delivery with Travis and ECS

ECS is a good product. Sadly it’s authored by the same UX designer that authored all other AWS products, so a lot of people couldn’t even succeed in starting a simple hello world container.

Some months ago @fusillicode wrote a two-part tutorial on how to dockerize and deploy on ECS a WordPress app (you can find them here: part 1 and part 2). Of course, given we’re talking of docker, the technology you’re using is not so important.

What’s missing in those posts is how to do a painless deploy.
Continue reading “Continuous delivery with Travis and ECS”

Selenium WebDriver on Travis

Selenium on Travis may seem impossible because Travis has no window manager, instead it’s possible thank to xvfb and even easy to setup.

First of all, ensure to setup your app to use selenium for integration tests. Then push your stuff. Travis tests will fail (because it doesn’t know about selenium).

Now, let Travis meet Selenium!

We have to enable the virtual framebuffer on travis. You can do this appending the following to your .travis.yml:

- "sh -e /etc/init.d/xvfb start"
- "export DISPLAY=99:0"

We also need to download and execute selenium. To do this add the following (always inside before_script):

- "wget"
- "java -jar selenium-server-standalone-2.43.1.jar > /dev/null &"

Commit your .travis.yml changes and push. Travis tests will NOW pass 🙂