Gitlab: How to collect raw log into artifact?

Viewed 1282

I was wondering if it is possible to collect the "raw" log file into an artifact in Gitlab ci?

I have tried to ask this on Gitlab forum but no answers.

1 Answers

You can do this by retrieving the raw log the job and adding it as an artifact. Be sure to retrieve it at the end of your job so the whole output will be in it.

Example:

wget -O raw_log.txt https://gitlab.com/user/project/-/jobs/$CI_JOB_ID/raw

The environment variable $CI_JOB_ID is automatically set by Gitlab.

Related