diff mbox series

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

Message ID 20240602122559.118345-5-npiggin@gmail.com (mailing list archive)
State New, archived
Headers show
Series powerpc fix and misc docs/build/CI improvements | expand

Commit Message

Nicholas Piggin June 2, 2024, 12:25 p.m. UTC
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(+)

Comments

Thomas Huth June 3, 2024, 4:29 a.m. UTC | #1
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>
Nicholas Piggin June 3, 2024, 8:17 a.m. UTC | #2
On Mon Jun 3, 2024 at 2:29 PM AEST, Thomas Huth wrote:
> 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.

This wording is a bit scrambled too, I wrote it thinking CI was using
build step by default. It seems to be test so changing the words around
didn't work (also I'll fix the closing paren). I'll fix that up.

Thanks,
Nick

> >   .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>
diff mbox series

Patch

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