Re: [kvm-unit-tests PATCH 4/4] gitlab-ci: Always save artifacts

Thomas Huth
2024-06-03T04:29:10Z

On 02/06/2024 14.25, Nicholas Piggin wrote:
> The unit test logs are important to have when a test fails so
> mark these as always save.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> .gitlab-ci.yml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 23bb69e24..c58dcc46c 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -4,14 +4,19 @@ before_script:
> - dnf update -y
> - dnf install -y make python
>
> +# Always save logs even for build failure, because the tests are actually
> +# run as part of the test step (because there is little need for an
> +# additional build step.
> .intree_template:
> artifacts:
> + when: always
> expire_in: 2 days
> paths:
> - logs
>
> .outoftree_template:
> artifacts:
> + when: always
> expire_in: 2 days
> paths:
> - build/logs

Reviewed-by: Thomas Huth <thuth@redhat.com>