Commit Graph

9 Commits

Author SHA1 Message Date
Ian Wienand 8c44ef9385 Remove deprecated upload-afs role
See I493d8829e3fd98e84f1b8f0e776e7ba41abf16c2

Change-Id: I445b15a42e6c1f37edd12d7f43cfd5a1d055b450
Depends-On: https://review.opendev.org/705370
Depends-On: https://review.opendev.org/705371
Depends-On: https://review.opendev.org/705372
2020-02-04 07:41:59 +11:00
Ian Wienand cd258e5a1d upload-afs: rename to upload-afs-roots; add afs-upload-synchronize
The upload-afs role is actually fairly specialised for uploading docs
with its root-marker scheme.  As we're moving more parts of our
infrastructure to publish via AFS I think it's worth making this quite
explicit by renaming the upload-afs role to upload-afs-roots.  This
should be transparent as we call the renamed role, and once callers
have been migrated we can use the usual deprecation process.

Add a partner role, upload-afs-synchronize, which is more of a
straight copy with options to synchronize.  This will be suitable for
uploading tarball and release artifacts.  This is similar in concept
to the promotion job used by zuul [1], but in this case will be
focused on the extant publishing jobs in project-config which don't
currently use the artifact-reporting/promote process.

[1] https://opendev.org/opendev/base-jobs/src/branch/master/playbooks/artifacts/promote.yaml#L39

Change-Id: I493d8829e3fd98e84f1b8f0e776e7ba41abf16c2
Story: #2006598
Task: #38600
2020-02-04 07:41:00 +11:00
Andreas Jaeger 1237417ea3 Update upload-afs README
Explain the intention of this role and the details of .root-marker,
some of it is copied verbatim from the infra-specs repository design
document.

Change-Id: I6d9124c7eafadc4b53626ff2fef6be6399f61947
2020-01-31 08:33:38 +01:00
Ian Wienand eee316ce7b Enable Python 2.7 unit tests
Add a testenv:py27 environment that overrides basepython to 2.7

Unfortunately implicit namespace packages are a Python3 thing [1] so
we have to scatter a few __init__.py's around for the test loader
under python2 to be able to find the unit test directories.

Update documenation to mention this

Needed-By: https://review.openstack.org/592768

[1] https://www.python.org/dev/peps/pep-0420/

Change-Id: I9a653666e8a083fb7f3fbb92589fe0467a41e6e6
2018-08-17 10:23:20 +10:00
James E. Blair 1548d82ffd Add a python unit test framework
Add a unit testing framework for python roles.  Thanks to Matthew
Treinish for the suggestion of how to perform discovery (and much of the
code which is copied from Tempest).

Change-Id: Iec95dd1026a41614def57c65c3faa0516a682a5a
2018-07-25 09:11:25 -07:00
Monty Taylor 82af975879
Update tox/test-requirements
In working on a different patch it became clear that flake8 wasn't
actually running such that it found errors. Updated the
test-requirements to match what's in zuul and all started working (and
failing) properly.

Change-Id: Icfdb1fedbd92ff49484b116a0879686581274a25
2017-09-02 14:17:32 -05:00
Paul Belanger ce252a9051
Fix python3 encoding issues with zuul_afs
NamedTemporaryFile mode is mode='w+b' by default. Make sure we encode
utf8 and write bytes to our temp file.

Change-Id: I0b31abcd52c049efc7d95d6d6e39dfb5d0860620
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-01 13:36:22 -04:00
Paul Belanger 957cd57ea9
Fix syntax issue with NamedTemporaryFile
We need to use filter_file.name to get the actually path.

Change-Id: I130284fdaccd1ace139d71b8a3395e9e9fa0df76
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-31 18:35:23 -04:00
Paul Belanger 693258ab65
Create upload-afs role
This is a modified version of zuul_afs we are running in zuulv2.5. The
differences is we no longer setup kinit / aklog / k5start here.
Instead we'd use the create-afs-token / destroy-afs-token roles.

Change-Id: Id6223283dd10f178d13865a53e4f5d17ad73c661
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-29 15:43:22 -04:00