38 Commits

Author SHA1 Message Date
Zuul
f711070737 Merge "Add configure-swap role" 2017-10-26 22:58:53 +00:00
Andreas Jaeger
4c164f08da Hande write-root-marker in tag pipeline
The tag-pipeline does not set zuul.branch, so define it to an empty
string if it's unset so that the script passes.

Change-Id: Iddcf722abec5c6a69f40cb109e5563a698ab349c
2017-10-26 22:06:49 +02:00
Ian Wienand
1d01c6d3da Add configure-swap role
This is a role to configure swap and /opt on an infra host.

Originally we wrote this for devstack-gate with
Icd4e6d8ab84471ad06e69c3e0f9bac92776efc78.  It was ported into the
native devstack job with Iffe54fbccbccd68db08f79a1b51dd7f76dbff408.

This is really generic, and it's quite possible non-devstack jobs
would like to setup swap for jobs too, so o-z-j is a better home for
the role.

Change-Id: I0e9c846ace7fac8a1340746c6818fba6ec963018
2017-10-20 14:13:33 +11:00
David Moreau-Simard
e402697cbb
Refactor fact configuration for service_type_data
The service_type_data was not working properly and errored out
with a traceback on exit_json from the module.

We can actually handle this in native Ansible without a module so
let's do that and also hint the user at the issue if a project happens
to use this role without being mapped in the service types.

Change-Id: Icdac2f5325a01748cdb8a830430b8f66a035d416
2017-10-19 16:52:10 -04:00
David Moreau-Simard
abf7f312c4
Use dest instead of src for get_url downloaded resource
'src' is a temporary file reference that exists only for the
duration of the download, it is not the location where the file
gets downloaded.

The location of the downloaded file is the 'dest' key, so use that
instead.

Change-Id: I2ff1b9c442d1cc88820c49d680567b0b16401ef3
2017-10-19 11:12:32 -04:00
Andreas Jaeger
840c2c0b83 prepare-docs-for-afs: Allow reuse
Allow reuse of the roles for other directories than doc/build/html with
making doc_build_dir a variable that can be overwritten. This allows to
use the role also for e.g. deploy-guide that lives under
deploy-guide/source and builds under deploy-guide/build.

Change-Id: I61cd84be201d14d0a1d5daba3a45c8797496bc7f
Needed-By: Ifff767a95e6283c54033bababd3dae84bb19adb6
2017-10-17 21:13:52 +02:00
Paul Belanger
b41fd3f209
Use tempfile for get_url task set-service-type-data-fact
We don't actually collect facts on executor for security reasons,
however we can use the result.src from get_url to get the file info.

Change-Id: I867c013ab7e3883c8b9cdb0d7b06fec854ed3d5a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-16 21:07:34 -04:00
Paul Belanger
0bc544b302
Fix syntax errors with set-service-type-data-fact role
Tasks key is not valid inside a role.

Change-Id: I5e6a98e483a13271d8b422162b4e3217e7b495fb
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-16 07:25:37 -04:00
Monty Taylor
53ebdfcf70 Add role to provice a service_type_data fact
We need to map from project name to service-type name from time to
time. The data is standard, so grab it from its published location
and use it.

Change-Id: Iea42ba981cee260cbccd0b1eb2705d3ad419bf20
2017-10-15 15:57:35 +00:00
Zuul
a9773f9b92 Merge "unbound: Add check for undefined default_ipv6" 2017-10-13 01:39:06 +00:00
Ian Wienand
d05b4fa33e unbound: Add check for undefined default_ipv6
It turns out ansible_default_ipv6 can be undefined without ipv6.
Combine the checks into a separte fact.

Change-Id: I96b0fd98db01b183946403a744ff2e8d2ae422d8
2017-10-13 10:56:40 +11:00
Mohammed Naser
b56b184d18
Move tox_envlist into job variables for releasenote jobs
At the moment, the tox_envlist is defined inside the include_role
for tox as releasenotes.  This means that other roles which run
beforehand such as tox-siblings will use the default value of
venv instead which isn't always defined.

This patch makes the change to make that variable defined in
the job which means that all other roles will reference the correct
tox envlist in the entire job run.

Change-Id: I0323f8f1bccf720268d947b8e1dcb6c5f8b26dfa
2017-10-12 17:43:48 -04:00
Mohammed Naser
ff7d83cc79
Drop tox_constraints_file from include_role for release notes
The parent of the build-openstack-releasenotes job is openstack-tox
which means that there is no point in defining tox_constraints_file
as it is already globally defined in openstack-tox.

Change-Id: I5f7d58dcd4c300e6b700a972c05e43c5d146765a
2017-10-12 17:40:57 -04:00
Ian Wienand
401520e274 Add unbound role
As mentioned in the README, this adds the dynamic configuration for
unbound on hosts. If there is a ipv6 route, it will set forwarding to
ipv6 servers, otherwise use ipv4. This is ported from the
configure_mirror.sh script.

We add a basic test to integration tests

Change-Id: I70b41e45f3d53b191742533c2f3b6c0b6e6c2339
2017-10-11 10:20:16 +11:00
Monty Taylor
f5f74d52d8
Make sure releasenotes always build on master
reno expects to be run on the master branch, so add an 'override-branch'
setting to the job.

While we're in there, add a description and remove the tox_envlist var,
as it is hard-coded inside of the role.

Change-Id: Ide918d1bb631590683f96bddc6b43c12c7ab5ac2
2017-10-09 08:48:43 -05:00
Monty Taylor
0fabbf4556
Always build releasenotes from master
reno wants to operate on master. Lucky for reno - we have that.

Change-Id: Ibc8e181b8e0f6fe920b544ea996007519c741254
2017-10-05 13:42:25 -05:00
Mohammed Naser
b80e33039c
Avoid moving release notes after complete execution
Originally, we were moving the release notes to another folder
to make it work with the fetch-sphinx-output role.  However,
this did not always work as expected due to the fact that some
projects do not have a doc folder.

This fixes that issue and avoids the move and simply grabs the
data from the right folder.

Change-Id: If6ee519c33320db91f8a9553ed4abc099c284eec
2017-10-04 21:34:17 -04:00
Mohammed Naser
622155cda7
Switch translated release notes conditionals
This takes the logic of translated release notes conditional
code into Ansible logic for clarity.

Change-Id: I811ffa1aa9fdaf1e8acafa4959874df32a8558ab
2017-10-04 20:46:14 -04:00
Mohammed Naser
74df19df6b
Refactor tox to use the role
This patch switches tox usage to use the new role as well uses
Ansible to move build output.

Change-Id: Ie01e96edac1e1fd9e7f0a3e2d6b39f813a561aa2
2017-10-04 20:46:08 -04:00
Mohammed Naser
65ccea6bc9
Refactor releasenote job to have one path for tox building
The past bash code had two paths for building release notes, it
makes it much harder to refactor and debug (for example, the result
was being moved only if the release notes had translations).

Change-Id: I45272750fc734566d08329d915fbedc10b9eed65
2017-10-04 13:10:48 -04:00
Monty Taylor
21c1d27074
Extract releasenotes build into a role
We need to use it in the publish job as well.

Change-Id: I0ba254501e9f913fd0aff8a03f1b4f127560c759
2017-10-01 10:52:44 -05:00
James E. Blair
2f230e02d5 Add a role to write a root marker
This is a single task within the existing afs prep role, but we
need to be able to do it alone for certain special doc builds,
like infra index page generation.

We could use include_role in the future to de-duplicate this, once
zuul_json supports that.

Change-Id: Ia6c6257cb1479abef79bf919cb6ad25ea6828d90
2017-09-27 16:00:00 -07:00
Paul Belanger
46596a6581
Remove duplicate .root-markers for prepare-docs-for-afs
We've already added this file above, lets skip.

Change-Id: I1d59439eb129db337238e55b7e1410f6f33b0430
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-09 20:04:30 -04:00
Zuul
eb72ac2daa Merge "Set build dir fact for prepare-docs-for-afs" 2017-09-09 16:51:53 +00:00
Paul Belanger
eeec503eda
Set build dir fact for prepare-docs-for-afs
Otherwise, this job is broken.

Change-Id: I15014d714fd1d89febd48d25530aedab07440e7f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-09 12:12:10 -04:00
Ian Wienand
0c1ecb990f Add role to make /etc/ci/mirror_info.sh
The mirror info script is sourced by various jobs so needs to be
around for broad compatability.  Since it's full of openstack only
mirrors, this seems like the place for it.

Change-Id: I66164920642a6015a6524fdc3105e4099d26deff
2017-09-09 03:24:44 +00:00
Paul Belanger
1af99f7795
Rework .root-marker for shell task
We have already created the root-marker above, so need to move it from
html directory.

Change-Id: I621c8ced3df456395853657ae8ba50dc604fa5e0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-08 15:30:48 -04:00
Paul Belanger
f45ff691af
Add chdir for prepare-docs-for-afs
We need to be running out shell commands within the proper git src.

Change-Id: I9bb6bb85b1fc68cd475eddef38ed6bd11ee0f9dc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-08 14:34:25 -04:00
Paul Belanger
d8e1dc6684
Fix syntax error in prepare-docs-for-afs
Change-Id: I5b4d9ee2877ab6f677c61f6a1ec81fae8ce17354
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-08 13:19:15 -04:00
Paul Belanger
62379dccf9
Add prepare-docs-for-afs role
We'll use this role for unified openstack docs publishing.

Change-Id: I879d42cd04ab051b91c0b636856470cd4126b6f2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-08 11:54:02 -04:00
Monty Taylor
2d2a717f29
Ansiblify prepare-infra-docs-for-afs
The existing code in branch made a directory for build/{{ branch.tag |
dirname }} but then moved things to build/{{ branch.tag | basename }}
which produced:

  html/
  html/feature
  html/zuulv3

Fix that. While we're in there, go ahead and change this into individual
ansible tasks.

Change-Id: Ib757d1f8bf76012d2d436565913e750c4a5d52a7
2017-09-06 14:00:44 -05:00
Paul Belanger
ec3e096a4c
Update to using zuulv3 variables
The prepare-docs-for-afs role was using zuulv2 variables,
but these don't exist in zuulv3. Update to using the variables
that do exist. Add a flag to take the place of $2 in the original
script which was called by the docs-tags-only-env builder.

When we migrate, we can just add that variable to the
openstack-doc-build entry in the pipelines of bindep, git-restack and
git-review which are the only three projects which use that flag.

Change-Id: Ib998f83135a4fcb796a205e52c435ab29b7cab7b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-05 18:51:40 -04:00
Paul Belanger
85159bc42f
Refactor run-docs role to use tox role
We can leverate tox role from tox-docs for running out python setup.py
build_sphinx command. This just leaves 'run-docs' role with openstack
specific rename logic.  The next patch in the series will refactor
this another fitting name.

Change-Id: Ic45541089391cea1d0b787a48be002d645cd28ea
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-02 14:45:50 -05:00
Paul Belanger
41f672ba2d Move run-docs.sh intree
So, we need to break the dependency on jenkins/scripts, to do that,
first import the current shell script so we can start ansiblefy it.

Change-Id: I3e58da365badb450977e4ad5438d7612d1074a02
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-31 22:31:01 +00:00
Paul Belanger
c0c9653ab5
Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.

Switch run-docs to command task, since we are not using any shell
variables.

Ignore ANSIBLE0012 for now.

Change-Id: Id184f7eb5dd67117e7dde9c8eb38a3a8af9dd892
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 13:18:17 -04:00
James E. Blair
6a8e17bf61 Use zuul-jobs style var names in run-docs
This job still needs to be updated to replace the jenkins script
with ansible.  But so that we can go ahead and remove the
zuul_workspace_root variable from everywhere, replace it with
the variables that we use for the tox jobs in zuul-jobs.

Change-Id: I991dc6c60fb7290be40e8d89ab2cdeb7ab8879c4
2017-07-17 09:51:06 -07:00
Monty Taylor
a74ab6dc96
Rename zuul-run-docs to run-docs
Change-Id: If639d35ded59621c38d0ecb16344817fd176c31c
Depends-On: I19496e372df722efef3a372b4da28a4fd2f79c18
2017-07-06 19:13:13 -05:00
Monty Taylor
e4cd286d56
Copy in run-docs role as zuul-run-docs
Change-Id: Ic408618ba9d5e5b11c9fe5b614736f80fef1f75e
Depends-On: I97c18936fc014283cdf5b57bece49bf92153ff13
2017-07-06 19:11:56 -05:00