diff mbox series

[v3,5/6] gitlab-ci: Simplify before/after script for Avocado based jobs

Message ID 20210519184549.2192728-6-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series gitlab-ci: Allow using FreeBSD runners | expand

Commit Message

Philippe Mathieu-Daudé May 19, 2021, 6:45 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 .gitlab-ci.d/buildtest-template.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Willian Rampazzo May 19, 2021, 7:42 p.m. UTC | #1
On Wed, May 19, 2021 at 3:46 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  .gitlab-ci.d/buildtest-template.yml | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Thomas Huth May 20, 2021, 8:04 a.m. UTC | #2
Missing patch description. Could you please elaborate why this change is ok?

  Thanks,
   Thomas


On 19/05/2021 20.45, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   .gitlab-ci.d/buildtest-template.yml | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
> index a625c697d3b..f968fa1ad99 100644
> --- a/.gitlab-ci.d/buildtest-template.yml
> +++ b/.gitlab-ci.d/buildtest-template.yml
> @@ -74,7 +74,7 @@
>         - build/tests/results/latest/test-results
>       reports:
>         junit: build/tests/results/latest/results.xml
> -  before_script:
> +  script:
>       - mkdir -p ~/.config/avocado
>       - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
>       - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
> @@ -85,6 +85,9 @@
>           du -chs ${CI_PROJECT_DIR}/avocado-cache ;
>         fi
>       - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
> -  after_script:
>       - cd build
> +    - find . -type f -exec touch {} +
> +    # Avoid recompiling by hiding ninja with NINJA=":"
> +    - $MAKE NINJA=":" $MAKE_CHECK_ARGS
> +  after_script:
>       - du -chs ${CI_PROJECT_DIR}/avocado-cache
>
diff mbox series

Patch

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index a625c697d3b..f968fa1ad99 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -74,7 +74,7 @@ 
       - build/tests/results/latest/test-results
     reports:
       junit: build/tests/results/latest/results.xml
-  before_script:
+  script:
     - mkdir -p ~/.config/avocado
     - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
     - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
@@ -85,6 +85,9 @@ 
         du -chs ${CI_PROJECT_DIR}/avocado-cache ;
       fi
     - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
-  after_script:
     - cd build
+    - find . -type f -exec touch {} +
+    # Avoid recompiling by hiding ninja with NINJA=":"
+    - $MAKE NINJA=":" $MAKE_CHECK_ARGS
+  after_script:
     - du -chs ${CI_PROJECT_DIR}/avocado-cache