Как сохранить consoleText после завершения джобы

В Execute Shell я использовала команду wget http://jenkins:8080/job/Jenkins_name_job/${BUILD_ID}/consoleText

Хотелось бы использавать Archive the artifacts. Но никак не пойму как.
В Post-build Actions / Archive the artifacts прописала ${Build_ID}/logs/* .
Но выдает ошибку:
ERROR: No artifacts found that match the file pattern “184/logs/*”. Configuration error?

Навскидку: может, полный путь указать? чтобы было типа /opt/…/184/logs ?

Тогда такая ошибка:
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties file path ‘/some_way/some_build_id/logs/’
[EnvInject] - [ERROR] - [EnvInject] - [ERROR] - Problems occurs on injecting env vars as a build step: java.io.IOException: remote file operation failed: some_way/ at hudson.remoting.Channel@79cb230f:jslave-1: java.io.IOException: Problem occurs on loading content
Build step ‘Inject environment variables’ changed build result to FAILURE
Build step ‘Inject environment variables’ marked build as failure
Archiving artifacts
Finished: FAILURE

wget http://%jenkins%/508/consoleText
->
2015-08-12 14:46:20 (150 MB/s) - ‘consoleText’ saved [9803/9803]

Так если файл сохраняется как просто consoleText, почему вы его пытаетесь найти по ${Build_ID}/logs/* ?
Архивьте просто “consoleText”

1 лайк

Спасибо. Теперь все понятно