Commit Graph

8 Commits

Author SHA1 Message Date
Ian Wienand 6d23d20f2f linters: add names to blocks
This is preparation for a later version of ansbile-lint, which finds
missing names on blocks.  This seems a reasonable rule, and the
Ansible manual says [1]

  Names for blocks have been available since Ansible 2.3. We recommend
  using names in all tasks, within blocks or elsewhere, for better
  visibility into the tasks being executed when you run the playbook.

This simply adds a name tag for blocks that are missing it.  This
should have no operational change, but allows us to update the linter
in a follow-on change.

[1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html

Change-Id: I92ed4616775650aced352bc9088a07e919f1a25f
2022-07-27 17:13:39 +10:00
Andreas Jaeger 7513629be7 Skip test-setup.sh in pep8 jobs
pep8 jobs should not require database setup, etc, so we can skip
running test-setup.sh to save time.

Also, address comments from https://review.opendev.org/670120 and
use a block to not run the stat if can we will skip using the file.

Change-Id: Ia140b331ae1502fcf1f685faa6dace117d77d35d
2019-07-10 19:02:57 +02:00
James E. Blair 9d8e765881 Add test_setup_skip role variable
This allows jobs which inherit from unittests to specify that
the test-setup script should not be run.  Some "unit test" jobs
are simple enough that they do not need to perform costly setup
for a full test run.

Change-Id: I5826bed411c42f9b3e0477b351bd82bd964d2fac
2019-07-10 09:22:30 -07:00
James E. Blair 023cee1106 Expand documentation of test-setup role
It honors this variable, but does not document it.

Change-Id: I67760c27f0843f8d5a41682878be3cce53c08ba4
2019-06-25 04:27:01 +00:00
Kenneth Giusti 1eafcaabbb Parameterize the test-setup role
The patch will allow jobs to set environment variables and pass
command line arguments to the test-setup.sh script defined by a
project.

This can be used to customize the setup based on the particular job
being run.

Change-Id: I11e1ab15fd2bf3c734544121d9b4040b99ee63da
2017-12-07 09:48:38 -05:00
Paul Belanger 829297c37a
Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.

Fix variable linting issues and ignore ANSIBLE0012.

Change-Id: I07aa940245e700c9f08df0f1920720f0ed9d3de0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 16:50:06 -04:00
Monty Taylor 055de47b4e
Add zuul_work_dir default to one-project roles
We'd like to be able to make some jobs that run tox on other projects
for ease of testing. This should allow us to do that.

Change-Id: I774a76eaaea16d8ea218b439a099b5c9335c2fc5
2017-07-07 17:04:46 -05:00
Monty Taylor 4b9fc09a1c
Port in tox jobs from openstack-zuul-jobs
The original idea was that we'd have a "python27" job. But it turns out
that "python27" isn't actually as universal as you might think.
"tox-py27" on the other hand is a thing that can and should always work
for people who want to run tox with the py27 env.

Port in the jobs we had in openstack-zuul-jobs.

Also, copy in the text of the old shell scripts so that we can iterate on
them and make them better piecemeal.

These are named zuul-tox not tox because we already have tox jobs
defined elsewhere. We'll need to do the naming dance while we work on
them.

Change-Id: I813f3f2ae138c07918556bc81655518023527131
2017-07-06 11:18:47 -05:00