We need to nail down the directory structure that we'll be using for the testing servers. Things to consider:

- Where does the code live: /usr/local/drupal-ci?
- Where do the build artifacts live: jenkins default dir?
- Where do the container images live: docker default dir?
- Where do the external volumes live on the slave servers: ?
- Where do the logs live?
- etc.

Comments

jthorson’s picture

Project: » DrupalCI: Test Runner
ricardoamaro’s picture

All of these are flexible and can be passed to the Docker testrunner (run.sh) via Environment variables:

a) Code repo checkout can be anywhere in the filesystem
/opt/drupalci_testbot or /usr/local/drupalci_testbot can be place
right now running locally the user will have it by default on $HOME/drupalci_testbot

also the github master copy is moved definitely to: https://github.com/ricardoamaro/drupalci_testbot

b) Build artifacts can be passed to the testrunner with these variables, which have defaults:

IDENTIFIER="build_$(date +%Y_%m_%d_%H%M%S)" # Only [a-z0-9-_.] allowed
REPODIR="$HOME/testbotdata"
BUILDSDIR="$REPODIR"
WORKSPACE="$BUILDSDIR/$IDENTIFIER/"

c) docker default dir for container images should be the most compliant decision.

d) Where do the external volumes live right now on the slave servers?

c) testrunner logs are written, right now to the same place as $WORKSPACE, which can be changed of course.

mile23’s picture

Status: Active » Needs work

How is this currently happening?

jthorson’s picture

Testbot Operation:
i) Source code is either pulled down from the provided git repository, or if DCI_UseLocalCodebase is defined, uses the codebase in the provided directory.
ii) Checkout is performed into a directory (or codebase copied into the directory). Uses /tmp/- by default, or if DCI_WorkingDir is defined, the directory passed in that variable.
iii) The directory from ii) is mapped directly into the container. For simpletest jobs, it's mapped into /var/www/html by default. (This Mount point is currently hardcoded per container in src/DrupalCI/containers/executablecontainers/web/web-5.4.yml; but should eventually be made a variable as well.)
iv) For simpletest jobs, the xml output is saved in /var/www/html/results ... this can be overridden via the DCI_XMLOutput directory, but the directory must exist for the results to be written. Right now, the /var/www/html/results directory is created with a standalone build step, hardcoded into the default simpletest job definition template (/src/DrupalCI/Plugin/JobTypes/simpletest/drupalci.yml).
v) For SQLite database jobs, the default SQLite database is stored in /tmp/.ht.sqlite

On web-5.x containers, the apache logs are found at /var/log/apache2 ... but note that not all logging functions will run, since the containers are only running a single process (in this case, apache2ctl -D FOREGROUND), and therefore, any functionality that relies on other processes to be running (things like logrotate) will fail.

Mixologic’s picture

Status: Needs work » Closed (outdated)