Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 2.71 KB

README.md

File metadata and controls

56 lines (35 loc) · 2.71 KB

Red Hat Developers Site Docker section

Back: ../README.md

First steps

Please follow the docker set up instructions in the main README file

Environments

TLDR: Use ./control.rb -e awestruct-dev ... to run with the legacy development environment on your machine.

The Docker setup for the developers.redhat.com project has the notions of environments. The enivronment you will need to use depends on which version of the site you want to use. Environment support was introduced to allow for the development and support of Drupal, whilst maintaining the old development workflow.

You should read the environments README.md for more information.

The default environment

The default environment is set to be the Awestruct Pull Request environment. This was done so that we could migrate to the new environment strategy without having to change the current or create a new pull request job in Jenkins.

At a later date the default environment will likely be changed to something more developer friendly.

Running the unit tests

Any change you make to the Docker setup or control scripts should be accompanied by a unit test. There are plenty of examples of tests in the tests directory.

The unit tests are fast to run, hence they get run for most tasks via the control script. To run them in isolation run

bundle exec ./control.rb -e awestruct-dev -t

Working on content / page design

When working on site content or design, it's probably best to have the site running in live-reload mode. This mode is slow, and slightly unreliable with regard acceptance tests. However it is probably the most productive way to work as it does not require a new build each time. To do this run:

bundle exec ./control.rb -e awestruct-dev --run-the-stack

This will allow you to work with any of the pages generated by awestruct. If you want to quit, then CTRL-C to stop.

Running the acceptance tests

Every commit will be acceptance tested once a Pull Request is open. To run this via docker then the command is :

bundle exec ./control.rb -e awestruct-dev --acceptance_test_target=<host_to_test>

This will run up a stack that can have the acceptance tests run against it. While the tests are running, you'll see a message such as: "still trying host:http://docker:32768, is the server up?" This is to be expected. If the message persists for more than 5 minutes, it's probably worth investigating what the awestruct service is doing.

The reason we're not able to run the live reload and acceptance together is due to repeated failures. Currently the only way to get an accurate repeatable test result is loading a fresh, non-live reloaded stack.