[PATCH v3 07/11] gitlab-ci: Extract common job definition as 'cross_common_job'

Philippe Mathieu-Daudé posted 11 patches 5 years, 3 months ago
[PATCH v3 07/11] gitlab-ci: Extract common job definition as 'cross_common_job'
Posted by Philippe Mathieu-Daudé 5 years, 3 months ago
Extract the common definitions shared by '.cross_system_build_job'
and '.cross_user_build_job' to '.cross_common_job'.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .gitlab-ci.d/crossbuilds.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
index 099949aaef3..701550f028c 100644
--- a/.gitlab-ci.d/crossbuilds.yml
+++ b/.gitlab-ci.d/crossbuilds.yml
@@ -1,7 +1,9 @@
-
-.cross_system_build_job:
+.cross_common_job:
   stage: build
   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
+
+.cross_system_build_job:
+  extends: .cross_common_job
   timeout: 80m
   script:
     - mkdir build
@@ -14,8 +16,7 @@
     - make -j$(expr $(nproc) + 1) all check-build
 
 .cross_user_build_job:
-  stage: build
-  image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
+  extends: .cross_common_job
   script:
     - mkdir build
     - cd build
-- 
2.26.2

Re: [PATCH v3 07/11] gitlab-ci: Extract common job definition as 'cross_common_job'
Posted by Thomas Huth 5 years, 3 months ago
On 08/11/2020 23.19, Philippe Mathieu-Daudé wrote:
> Extract the common definitions shared by '.cross_system_build_job'
> and '.cross_user_build_job' to '.cross_common_job'.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  .gitlab-ci.d/crossbuilds.yml | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

5 insertions, 4 deletions ... is it really that much better?

 Thomas


Re: [PATCH v3 07/11] gitlab-ci: Extract common job definition as 'cross_common_job'
Posted by Philippe Mathieu-Daudé 5 years, 3 months ago
On 11/9/20 10:52 AM, Thomas Huth wrote:
> On 08/11/2020 23.19, Philippe Mathieu-Daudé wrote:
>> Extract the common definitions shared by '.cross_system_build_job'
>> and '.cross_user_build_job' to '.cross_common_job'.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  .gitlab-ci.d/crossbuilds.yml | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> 5 insertions, 4 deletions ... is it really that much better?

It becomes useful later we we add a lot into cross_common_job,
rather than duplicating in cross_[system/user]_build_job.

I understand this commit description lacks that information.

Thanks.


Re: [PATCH v3 07/11] gitlab-ci: Extract common job definition as 'cross_common_job'
Posted by Wainer dos Santos Moschetta 5 years, 3 months ago
On 11/8/20 8:19 PM, Philippe Mathieu-Daudé wrote:
> Extract the common definitions shared by '.cross_system_build_job'
> and '.cross_user_build_job' to '.cross_common_job'.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   .gitlab-ci.d/crossbuilds.yml | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
>
> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
> index 099949aaef3..701550f028c 100644
> --- a/.gitlab-ci.d/crossbuilds.yml
> +++ b/.gitlab-ci.d/crossbuilds.yml
> @@ -1,7 +1,9 @@
> -
> -.cross_system_build_job:
> +.cross_common_job:
>     stage: build
>     image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
> +
> +.cross_system_build_job:
> +  extends: .cross_common_job
>     timeout: 80m
>     script:
>       - mkdir build
> @@ -14,8 +16,7 @@
>       - make -j$(expr $(nproc) + 1) all check-build
>   
>   .cross_user_build_job:
> -  stage: build
> -  image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
> +  extends: .cross_common_job
>     script:
>       - mkdir build
>       - cd build