25 Commits

Author SHA1 Message Date
Paul Belanger
4ce2d40d68 Don't create bindep venv if bindep_file is not found
There is no need to install bindep, if we don't have a bindep file.

Change-Id: I33685e4905ceff23a6b772163ffce1a76143d2eb
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-30 12:27:36 -04:00
Andreas Jaeger
002956ee54 Update tox-docs to follow build-sphinx better
The build-sphinx job uses compile and test bindep profiles, update tox-docs to use the same.

tox-docs used to run tools/test_setup due to inheriting from unittests,
remove that inheritance since we do not need it.

Update role bindep to have a default for zuul_work_dir. If this role is
used without unittests, zuul_work_dir is unset.

Change-Id: I5df8b9cd90bf5e4f4c84c7b4514fb9c575898e31
2018-08-22 07:54:42 +02:00
Monty Taylor
5854988a65
Revert "Revert "Install build bindep profiles alongside doc and test""
Try again with "compile" as the new bindep profile name.

This reverts commit ac5912fd8a1fd656ec91855427291489a7ddd1cd.

Change-Id: I4a03c9c2377d0676fe6f5d11d2948a319b0ba341
2018-07-08 16:12:44 -04:00
Jeremy Stanley
ac5912fd8a Revert "Install build bindep profiles alongside doc and test"
This reverts commit e3d911b3ef9140274ee4a3aa4b3d4c300a4cfd27.

Puppet projects for OpenStack are already using a "build" bindep
profile which isn't satisfiable for some platforms on which they run
jobs. Revert for now while we consider either fixing them or
switching to a different profile name for this purpose.

Change-Id: I4131b6d67faf9e10004887e7b0b73c01ec7d421c
2018-07-07 00:31:40 +00:00
Monty Taylor
e3d911b3ef
Install build bindep profiles alongside doc and test
In order to be able to separate out depends needed for building wheels,
depends needed for running tests and depends needed for running
software, we can tag build depends with a 'build' profile. However,
doing that then means we don't have all of the things we need for
building docs or testing things.

Add build to the profile list for both docs builds and test installs.

Change-Id: I0689acb53789d3650926a3e11aec4570df5d950c
Needed-By: https://review.openstack.org/580159
2018-07-05 17:42:19 -05:00
Tristan Cacqueray
e2058a6b75 Fix deprecation warning of ansible-2.5
This change fixes this upcoming deprecation warning:

[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using
`result|skipped` instead use `result is skipped`. This feature will be removed
in version 2.9.

Change-Id: Ic0c93f2ea896ead76922694e6150882d8a280daf
2018-06-04 00:17:18 +00:00
Tristan Cacqueray
8a6b1215c3 bindep: use shell instead of command with executable
As of Ansible 2.4, the parameter 'executable' is
no longer supported with the 'command' module.

Also check for return code since it the |succeed changed
and now always returns True when using failed_when: false.

Change-Id: I4c33db7f3d6fd613a6144f7520054cbcf50684e1
2018-02-22 06:40:11 +00:00
Tristan Cacqueray
ea5c3d08da bindep: skip package install when not needed
When bindep test doesn't output package, there is no need
to run the package task.

Change-Id: I6f13e060a6d9657d3dec4f43a0b9c2dbff2d362d
2017-12-05 09:09:34 +00:00
Tristan Cacqueray
184f036fd8 bindep: fix install bindep_command fact name
After installing bindep, the role should set the bindep_command fact
instead of bindep_found_command. Otherwise the role fail later:

Task: Define bindep_command fact
The error was: 'bindep_command' is undefined

Change-Id: I11a21c9678c75b7887a8a58c25925dc87e7c9315
2017-12-05 08:52:31 +00:00
Monty Taylor
1ea07ceee2
Update bindep role defaults to be more sane
The default for bindep dir should really be zuul.project.src_dir.

Also, this is a CI system. Let's default profile to test.

Change-Id: Ibc0e7617195865c50ea2bb0e969963f0525ea9b1
2017-10-17 16:18:22 +02:00
Zuul
8f28435e35 Merge "Don't install bindep if there's no bindep file" 2017-09-07 18:00:31 +00:00
Monty Taylor
a18999e002
Don't install bindep if there's no bindep file
Change-Id: I60f229f06e9655bead1f38a8e2d70c3048c0269b
2017-09-05 21:50:09 -05:00
Zuul
5083adc2a8 Merge "Only do the bindep_command if bindep_file is defined" 2017-09-05 22:37:14 +00:00
Jamie Lennox
60328fef8c Only do the bindep_command if bindep_file is defined
If there is no bindep file at all in the repository (which is likely
because tox depends on bindep and won't always be useful) then
bindep_file is never set. Then when the set_face bindep_command comes
around it tries to reference the unset bindep_file and fails.

Change-Id: I7be6be88209810eed715daaa4bb41315e838272d
Signed-off-by: Jamie Lennox <jamielennox@gmail.com>
2017-09-05 16:22:24 +10:00
Jamie Lennox
4ac946c4f2 Pass correct variables to install bindep
The result of creating a temporary directory for bindep is a dictionary
of data include mode, uuid, and other things. When installing bindep
into that new directory we only want to specify the path to that dir.

Change-Id: If98f87ff44356911b78984eb884f7cd65660cebb
Signed-off-by: Jamie Lennox <jamielennox@gmail.com>
2017-09-05 10:40:08 +10:00
Tristan Cacqueray
4fdad7a741 upload-logs/bindep: fix indentation
These roles are failing yamllint:
  roles/upload-logs/tasks/main.yaml
  23:5      error    wrong indentation: expected 6 but found 4  (indentation)

  roles/bindep/tasks/install.yaml
  7:3       error    wrong indentation: expected 4 but found 2  (indentation)

Change-Id: I189dd08c4d1c091d1e53ca87d52dbaf3f89ba45f
2017-09-03 01:11:30 +00:00
James E. Blair
912f976155 Use new sphinx roles in docs
Change-Id: I92ce6b2f137f5dcb6fdee70c101c6b9d8ad5eb11
Depends-On: I9d72d11bfdb700037a6a08f92a2dbfa95ee519ad
2017-08-11 15:10:40 -07: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
Jenkins
e680449351 Merge "Use package module to install bindep packages" 2017-07-13 18:50:41 +00:00
Monty Taylor
fe6dc2204d
Use package module to install bindep packages
We can pass in a list of packages and the package managers we care about
should accept a list as input. We can't do the with_items trick because
the package action plugin does not support it.

Change-Id: Id79f33caa7cb3ab7255490d02cd2b43fc7d5227b
2017-07-13 08:07:03 -05:00
Paul Belanger
5738468cd8
Add openstack-doc-build job for documentation testing
Start gating on documentation changes. Eventually add support for
publishing them.

Change-Id: I9e75fee12e7d74db51661b6a1071a510788cde74
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-11 11:13:13 -04:00
Monty Taylor
242f0bfff4
Rework bindep role to be more ansible and less shell
There's still a chunk of shell, because it's honestly better than doing
the equiv with package manager modules would be.

Also, make zuul_work_dir a parameter we pass in from the playbook. The
bindep role itself is otherwise totally non-zuul specific.

Change-Id: I95e78dd25a1a54b3ce5f2ddb18228a183d3c06ad
2017-07-09 09:27:09 -05:00
Monty Taylor
1ba3e583f3
Make sure bindep is on the node
OpenStack nodes pre-install bindep, but other nodes may not. Check to
see if bindep is on the node. If so, use it. If not, make a temp dir
that we remove at the end of the role and install bindep into a virtualenv
in that tempdir.

Change-Id: I3f34c178254add2143dc7f1b9758844480d7d914
2017-07-09 07:46:07 -05: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