Commit Graph

17 Commits

Author SHA1 Message Date
Sorin Sbarnea 6b8cc6d468 More E208 (final)
Change-Id: I705d1b10696326f3d4d5bef4b5a88a83f2c3d960
2020-11-10 19:34:45 +00:00
Ian Wienand 67f223b53a Partial revert "Ensure wheel exists for build-release-python"; move to ensure-pip
This partially reverts commit
3f961ce202.

This alternative installs wheel with the ensure-pip role instead of in
a separate role.  wheel is very closely linked with pip install
operations so this isn't a large overreach of the role.

I suggest this for several reasons; firstly the python-wheel role
doesn't try to install packages, so we end up with mixed system pip
and upstream versions of wheel most of the time.  This is the type of
thing that has proven problematic in the past.  It also installs via
pip --user; something we've already had problems with tox when for
various reasons roles want to run this as non-zuul user.  Using
ensure-pip we keep the packaged versions together.

[1] did try to install wheel with root, but during runtime which
didn't work due to sudo being revoked.  This should work for the
existing build-python-release job, because it already includes
ensure-pip in pre-run via playbooks/python/pre.yaml

I believe our conclusion on the ensure-* roles was that requiring
root/become: for installation is OK, but we should have a no-op path
if the tools are found.  This is consistent with that approach
(i.e. if you want wheel and can't do sudo, you should pre-install it
on your image using whatever you build that with).

This adds a check to the existing "is pip installed" check to also
check if wheel packages are available.  If not we trigger the install
path.

This revealed some issues with RedHat.yaml -- we can always install
Python 3 (packages available for CentOS 7) so remove that check, and
if Ansible is running under Python 2; ensure we install the
dependencies too (not only if it is forced).

Update the documentation to describe that it will enable support for
bdist_wheel, and add a basic sanity test that wheels are produced by
pip.  The existing build-python-release job is kept; although it is
modified to use the playbooks/python/pre.yaml playbook as the build
job does.

Change-Id: I2ab11bb45b6b2a49d54db39195228ab40141185c
[1] https://review.opendev.org/#/c/736001/5/roles/build-python-release/tasks/main.yaml
2020-06-18 12:51:56 +00:00
Sorin Sbarnea 3f961ce202 Ensure wheel exists for build-release-python
We need it to exist for building wheels. It should be
installed in a pre-playbook.

Change-Id: Ieaec3d21911decf11283e82fed97dd26b3a93ffa
2020-06-17 16:59:24 -05:00
Monty Taylor ed3fdf5a8d Add ensure-pip to build-python-release
It assumes setuptools has been installed, which we usually get
via the installation of pip.

Change-Id: I0b8f408a47a78a6a04bdbd083f949bb82713776b
2020-06-16 07:57:26 -05:00
Albin Vass 6292b5ec86 tarball-post.yaml: do not synchronize owner
Change-Id: I6683d80ea11a177da891e3fc529a3125f713656b
2020-05-18 17:05:32 +02:00
James E. Blair ea00b6aa5a Use human-readable names for artifact returns
This will cause links to appear on the build page with text like
"Docs preview site".

Change-Id: I65f8990b65607e72190a871409c3e31014ce86df
2019-08-12 07:13:27 -07:00
James E. Blair acbe2849da download-artifacts: only consider the most recent build
If the download-artifacts query returns more than one build, only
use the most recent one, as earlier builds may be for failed gate
runs and fetching them may fail.

Also, fix one more location which was missing an "artifacts/"
path prefix when returing artifacts.

Change-Id: If988d1f2bea863e0dad267359515018aae25ad45
2019-06-11 08:42:51 -07:00
James E. Blair 6d13ee475d Correct artifact return url for python/js
The recent change to return the artifact URLs for python/js builds
omitted the artifacts/ directory from the URL.

Change-Id: If86749533e73dbfd17317acba22dbd05dff34abb
2019-06-10 13:41:52 -07:00
James E. Blair 93ee373b3b Return python artifact records to Zuul
In the python tarball-post playbook, return an artifact record
for each sdist and wheel that we find.

Change-Id: I328d11a85c55b856d07239129ef95c38f9b1027b
2019-06-06 06:19:00 +00:00
Ian Wienand 8fe3ff1a7e Remove trigger-readthedocs job
This job is no longer useful as RTD requires an authenticated
end-point now.  This has been replaced by the trigger-readthedocs role
in I651efdb093df85cea3ab2eaf1a5a9256c87a2ca4.  The dependent change
removes this job from the docs-on-readthedocs template, so it is now
unused.

Change-Id: I794ab68967e8d31d5522acc7484a11d3ebc88ee9
Depends-On: https://review.openstack.org/583834
2018-07-19 13:29:05 +10:00
Tristan Cacqueray f5180b5e4d python-upload-pypi: only run on success
Change-Id: I1774edb243cf694d76bc0939aa6cbab33ebfe678
2017-12-27 05:11:26 +00:00
Monty Taylor 04c7247604
Make build-python-release job
python-sdist isn't an accurate name since this also builds wheels. Make
a new job named build-python-release.

Also, use zuul_work_dir as the working dir variable.

This role was written rather early and isn't used yet. Change it to use
zuul_work_dir so that it matches other things.

Change-Id: Icfad9ad6ba5c7a0c62a8d5ce243952b81f28a47f
Depends-On: I8dfe5a41710392d6ca8453ce365f674a9d5e4f6e
2017-11-20 09:09:40 -06:00
Jens Harbott cc402a0b26 Follow redirects when triggering readthedocs build
The URL we post to returns a redirect to
https://readthedocs.org/projects/$short_name/builds/ so we have to
follow that.

Change-Id: I26c907df0ab4ec6eb40bce74f590cfab6eec38c7
2017-10-24 08:58:30 +00:00
Monty Taylor ead78fed13
Add trigger-readthedocs job
It's really easy to trigger a build on readthedocs. It doesn't even need
a node, since it's just a single POST.

Change-Id: I8c576c7a26ab123bd70f7a025d8a49a5cb3e2432
2017-08-28 20:17:44 -05:00
Monty Taylor 47b2a7c869
Add non-OpenStack PyPI upload job
If people are using normal tarball jobs to build sdist tarballs, they
can also use a normal job to upload them.

This job will require being passed a dict variable with username and
password, which really should be stored in a secret.

Change-Id: I5747856e54d07a98571db38f1827b3e3cfefe768
2017-08-22 16:09:03 -04:00
Monty Taylor 2a957c7f1c
Add non-OpenStack python tarball creation job
OpenStack python tarball building is weird and not done in a manner
consistent with how other folks do it. Make a job that just runs python
setup.py sdist bdist_wheel.

Change-Id: I0df77cdd00b9820bad3b9cde75be9e150057a584
2017-08-22 16:09:02 -04:00
Monty Taylor c36d95b4ba
Rename tox/tarball-post to python/tarball-post
The actions of the playbook don't really have anything to do with tox.
Tarballs go into dist/ whether tox is used or not.

Change-Id: I49d9efaf34644c47df0a1acb6ca108fe4ec99fa4
2017-08-22 16:09:02 -04:00