#185 Add standard role for docker images
Closed by dhodovsk. Opened by dhodovsk.
dhodovsk/standard-test-roles standard-test-image  into  master

Download 185.patch

This role is executed on container repositories (with Dockerfile as main component)

Hi, I do not see where it is used in this role.
Buy the way we have default definition for it at:

standard-test-roles/roles/str-common-init/defaults/main.yml:
remote_artifacts: /tmp/artifacts/
artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"

There two different location for artifacts: test-runner or test-environment

Include any playbooks after this role with tests you want to run. For example
test_local.yml

This is very strange approach. What you do:

You run all tasks from : standard-test-basic ... than you run tasks from roles/standard-test-image-docker/tasks/main.yml

What is reason to run standard-test-basic before docker is started ?

Or maybe I do not understand, please correct me.

Why do not use default definition tenv_workdir which is defined at :

./roles/str-common-init/defaults/main.yml:5:tenv_workdir: /var/str/

Please check comments to code.

This role does two things:

  1. Start docker service.
  2. Fetch Docker image.

The first one could be done in more generic way. Maybe add a new parameter to basic role something like:

required_services:
   - docker
   - httpd

?

This will be more generic approach.

Fetching required image could be a part of tests.yml. Do not see reason to add a whole new role only for this action.

@astepano good comments, good suggestions! I actually originally wrote the code a couple months ago and was fighting Ansible really hard b/c some things just didn't work, @dhodovsk took over to submit it as a PR. Therefore many of the issues you identified are either historical or lack of our Ansible knowledge.

We agree with your proposal. Thank you, Andrei!

Pull-Request has been closed by dhodovsk

Metadata