How's gitlab ci log cover up commands?
-
Now, in the collection logs, it's about that (bash):
... $ echo "Finish recompile objects" Finish recompile objects $ echo "BUILD - OK" BUILD - OK ...
I mean, when you're watching, the commands are injected and their results. Is there any way to hide the team and leave only the conclusion?
... Finish recompile objects BUILD - OK ...
There's an echo off regime in cmd, so I'd like to activate the same.
I'll be grateful for any ideas:
-
As aleksandr barakin correctly addressed in the commentaries, the solution is to use м multiple violin. https://docs.gitlab.com/ee/ci/yaml/script.html#split-long-commands )
myjob: script: - | # printing the job information echo -------------------------- echo Building ${CI_COMMIT_SHA} echo --------------------------
The conclusion of the slogan will be as follows:
(...) $ # printing the job information # collapsed multi-line command -------------------------- Building 629fcab9e39f8564cb2a0d1a7f104e2312a22288 -------------------------- (...)
Ultimately, the commands are not displayed except first, and the withdrawal is correctly displayed.
More options can be seen in this discussion: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4645