Commit Graph

10 Commits

Author SHA1 Message Date
Tony Breeds 4293d8b8d9 [docs][trivial] Remove redundant colon :
Using "For Example::" marks the next block as code, so we end up
emiting ".. code-block:: yaml"[1] as a code block which we don't really
want.  Remove the additional ':' so we emit the expected HTML.

[1] Check https://zuul-ci.org/docs/zuul-jobs/general-roles.html#role-stage-output
    before merge

Change-Id: Ic2e1fb9acb6a6b4ec77bf1ee0ec9ac5d809dfb7c
2022-10-19 12:10:50 -05:00
Clark Boylan 6ff47d56db Clarify that stage-output doesn't actually write to zuul_output_dir
The stage-output role's README indicates that it stages to the
zuul_output_dir on the remote node, but this isn't true. It actually
stages to {{ stage_dir }} which has a different default than
{{ zuul_output_dir }} in fetch-output.

Update the readme to make this more clear and reduce confusion.

Change-Id: I7a7ef801db8194a7101a8dc0a6d89e1292b3fa86
2022-09-26 18:28:58 +00:00
Clark Boylan a6f2ca827e Stop compressing files during intermediate steps part 2
Stop compressing files that would otherwise be handled uncompressed in
intermediate log handling. The reason for this is final log/artifact
upload should decide if a file need to be compressed or not as some file
hosting services (like swift) may not return the expected data if we get
this wrong.

This was noticed when we used swift to store intermediate tar.gz
tarballs before final upload to permanent storage. When retrieving the
tar.gz files from swift we got them back as uncompressed .tar files
(because swift was being helpful) and then later when we try to
uncompress these files we break.

Instead we'll let the upload to swift (or other storage) decide if files
should be compressed further than their existing state.

This is the second change in the stack and update the stage-output role.

Change-Id: I2fa6f123d23568ba1537a7c26d2672f04110c35b
2020-01-08 09:24:45 -08:00
James E. Blair 98628f718a stage-output: Add the ability to add .txt extensions to files
So that this can more easily work with files like '/var/log/syslog',
make it so that if the user specifies "logs_txt" then the file gets
a .txt extension before being placed in the logs directory.

The existing extensions_to_txt variable doesn't work for this because
it requires an existing extension.

Change-Id: I34fea0c44030c04a5540d6b62976557143289196
2019-01-31 10:48:58 -08:00
Andreas Jaeger 9566cbe07d Fix RST formatting
Remove whitespaces from build-python-release which make
the sphinx display as "** Role Variable
**" instead of bold "Role Variables".

Fix buildset-artifacts-location to display items as list.

Fix stage-output to display the example as example - and not wrap
around.

Change-Id: I8da3ec0c507d26f47ee9bb71dc9d1b3ed9ca23a5
2018-10-13 10:36:36 +02:00
Andrea Frittoli (andreaf) f7fd2fce61 Change the list of extensions to a dict
The stage-output role accepts a list of extensions to be replaced as txt
so that they can be seen directly from within a web browser.
Using a list means that children jobs cannot add to the parent setting,
only overwrite. Adding support for dicts while preserving, at least for
now, support for lists - to avoid breaking existing implementations.

This reverts change 844b3333aa.

Change-Id: I5052c873f0a5da7ecaa38627e8900af86bbec2f9
Needed-By: https://review.openstack.org/539686
Needed-By: https://review.openstack.org/539708
Needed-By: https://review.openstack.org/539854
2018-02-08 18:52:13 +00:00
Andreas Jaeger 844b3333aa Revert "Change the list of extensions to a dict"
This reverts commit 146fa7b2e6.

This does not work yet as planned. Let's revert for now and test properly again.

Change-Id: Idac7e398fe4854769589411f22f7c4ce7cb363f6
2018-02-02 18:33:12 +00:00
Andrea Frittoli (andreaf) 146fa7b2e6 Change the list of extensions to a dict
The stage-output role accepts a list of extensions to be replaced as txt
so that they can be seen directly from within a web browser.
Using a list means that children jobs cannot add to the parent setting,
only overwrite. Adding support for dicts while preserving, at least for
now, support for lists - to avoid breaking existing implementations.

Change-Id: Ifc4b2070c5844e51acb9ad5d512e9f25f5bdd7ef
2018-01-31 20:58:38 +00:00
Andrea Frittoli (andreaf) 2ea8661801 Add compress capabilities to stage artifacts
Compress files and files in folders. Use gz by default.

Change-Id: I72796e64a65fe88d85168734ac881ee3ec2ce100
2017-11-16 12:02:00 +00:00
Andrea Frittoli (andreaf) 786c48f051 Add a generic stage-output role
This role does roughly what save_dir and save_file do in d-g
functions, only it can be used for a list of files and/or
folders. Jobs can use this role to rename artifacts and place
them in a staging folder which is then used for mass sync to
the executor.

This is typically used in post - the zuul user won't necessarily
have write access to the folders with the artifacts - so it's
easier to stage everything to a folder owned by the zuul user.

Change-Id: Id45a50821539985710da7172a9185fd91e803603
2017-11-02 07:22:26 +00:00