#367 support to save files on basic role
Merged by astepano. Opened by bgoncalv.
bgoncalv/standard-test-roles fix-role  into  master

Download 367.patch

fix https://pagure.io/standard-test-roles/issue/365

maybe add -p ? just in case

Do you think it is needed? Note STR_ARTIFACTS_DIR is already created at the begin of the script.

if you replace join(',') with join(' ') this also should work, but no need then : do : tr

yes, it would work. I just don't like to pass to bash a parameter with spaces. But if you prefer I can do this change.

@bgoncalv looks good, please add --save-files entry to msg_usage() { something like:

--save-files        file blobs, listed through comma. Related to directory $WORK_DIR OR test-dir (?? please write what is necessary)

And, could you please add a test, where we run this role for test, that has dir parameter ? Just to check it works correctly when we need to cd to test-dir

rebased onto 552d85a43fd5027aba58db61d45f4ff894f678c6

rebased onto 3cdeea1627ab4ec259586d96c4ba7ba2e682eac2

@bgoncalv looks good, please add --save-files entry to msg_usage() { something like:
--save-files file blobs, listed through comma. Related to directory $WORK_DIR OR test-dir (?? please write what is necessary)

And, could you please add a test, where we run this role for test, that has dir parameter ? Just to check it works correctly when we need to cd to test-dir

nice catch, I've updated it and added a new test.

@bgoncalv thank you.
Merging.
How about add the same approach for beakerlib role ?

Commit 6cdf434c fixes this pull-request

Pull-Request has been merged by astepano

Pull-Request has been merged by astepano

@bgoncalv thank you.
Merging.
How about add the same approach for beakerlib role ?

beakerlib has a function to archive the logs, I'm not sure what needs to be done for us to make it work on our environment. Maybe @jheger can help with info for it. I think it is this issue https://pagure.io/standard-test-roles/issue/35

As I stated in the previous issue there is a function in beakerlib called rlFileSubmit, usually used when you want to store a file from a testing environment into whatever system that runs your tests.
There is a default implementation in beakerlib that just copies specified file to /tmp on the tested machine, which is not very useful but behaviour of this function can be changed.
You can write script doing anything you want and then put a path to in BEAKERLIB_COMMAND_SUBMIT_LOG environmental variable. This new script could copy the files to the artifacts directory.

Metadata