[libvirt PATCH] gitlab: mark job dependencies as optional

Daniel P. Berrangé posted 1 patch 1 year, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220527114904.29395-1-berrange@redhat.com
.gitlab-ci.yml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
[libvirt PATCH] gitlab: mark job dependencies as optional
Posted by Daniel P. Berrangé 1 year, 11 months ago
The container jobs are all optional in upstream now, only
running if dockerfile changes were made. Thus any build
jobs which reference the container jobs need to mark their
dependency as optional too.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.yml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fbdd82aae..013f821881 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -62,7 +62,8 @@ website:
   stage: builds
   image: $CI_REGISTRY_IMAGE/ci-almalinux-8:latest
   needs:
-    - x86_64-almalinux-8-container
+    - job: x86_64-almalinux-8-container
+      optional: true
   before_script:
     - *script_variables
   script:
@@ -82,7 +83,8 @@ codestyle:
   stage: sanity_checks
   image: $CI_REGISTRY_IMAGE/ci-opensuse-leap-153:latest
   needs:
-    - x86_64-opensuse-leap-153-container
+    - job: x86_64-opensuse-leap-153-container
+      optional: true
   before_script:
     - *script_variables
   script:
@@ -98,7 +100,8 @@ potfile:
   stage: builds
   image: $CI_REGISTRY_IMAGE/ci-almalinux-8:latest
   needs:
-    - x86_64-almalinux-8-container
+    - job: x86_64-almalinux-8-container
+      optional: true
   rules:
     - if: "$CI_COMMIT_BRANCH == 'master'"
   before_script:
-- 
2.36.1

Re: [libvirt PATCH] gitlab: mark job dependencies as optional
Posted by Erik Skultety 1 year, 11 months ago
On Fri, May 27, 2022 at 07:49:04AM -0400, Daniel P. Berrangé wrote:
> The container jobs are all optional in upstream now, only
> running if dockerfile changes were made. Thus any build
> jobs which reference the container jobs need to mark their
> dependency as optional too.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  .gitlab-ci.yml | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 0fbdd82aae..013f821881 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -62,7 +62,8 @@ website:
>    stage: builds
>    image: $CI_REGISTRY_IMAGE/ci-almalinux-8:latest
>    needs:
> -    - x86_64-almalinux-8-container
> +    - job: x86_64-almalinux-8-container
> +      optional: true
>    before_script:
>      - *script_variables
>    script:
> @@ -82,7 +83,8 @@ codestyle:
>    stage: sanity_checks
>    image: $CI_REGISTRY_IMAGE/ci-opensuse-leap-153:latest
>    needs:
> -    - x86_64-opensuse-leap-153-container
> +    - job: x86_64-opensuse-leap-153-container
> +      optional: true
>    before_script:
>      - *script_variables
>    script:
> @@ -98,7 +100,8 @@ potfile:
>    stage: builds
>    image: $CI_REGISTRY_IMAGE/ci-almalinux-8:latest
>    needs:
> -    - x86_64-almalinux-8-container
> +    - job: x86_64-almalinux-8-container
> +      optional: true
>    rules:
>      - if: "$CI_COMMIT_BRANCH == 'master'"
>    before_script:
> -- 
> 2.36.1
> 

The coverity job needs the same treatment otherwise we'll see the same failure
tomorrow morning.

With that:
Reviewed-by: Erik Skultety <eskultet@redhat.com>

Erik