Re: [libvirt PATCH] gitlab: remove obsolete job rules for TEMPORARILY_DISABLED variable

2021-09-20 Thread Jiri Denemark
On Mon, Sep 20, 2021 at 13:41:07 +0100, Daniel P. Berrangé wrote:
> We previously had a 'rules:' entry that caused a job to be skipped if
> the variable "TEMPORARILY_DISABLED" was set. This is no longer needed
> since we can set a similar flag in ci/manifest.yml and re-generate
> to temporarily skip a job.
> 
> Unfortunately the 'rules:' entry had an unexpected side-effect on
> the pipelines that was never previously noticed. Instead of only
> running pipelines on push, the mere existance of the 'rules:' entry
> caused triggering of pipelines on merge requests too.
> 
> The newly auto-generated ci/gitlab.yml file does not have a 'rules:'
> for the container job template, and thus only runs on git push.
> 
> The result is that build jobs try to run on merge requests and the
> container jobs they depend on don't exist. This breaks the entire
> pipeline with a message that the config is invalid due to broken
> job dependencies.
> 
> This fixes a regression introduced in
> 
>   commit ccc7a44adbea003d6a0dc2f156adb2856c28bd4c
>   Author: Daniel P. Berrangé 
>   Date:   Thu Sep 9 14:49:01 2021 +0100
> 
> ci: re-generate containers/gitlab config from manifest
> 
> Signed-off-by: Daniel P. Berrangé 
> ---
>  .gitlab-ci.yml | 8 
>  1 file changed, 8 deletions(-)

Reviewed-by: Jiri Denemark 



[libvirt PATCH] gitlab: remove obsolete job rules for TEMPORARILY_DISABLED variable

2021-09-20 Thread Daniel P . Berrangé
We previously had a 'rules:' entry that caused a job to be skipped if
the variable "TEMPORARILY_DISABLED" was set. This is no longer needed
since we can set a similar flag in ci/manifest.yml and re-generate
to temporarily skip a job.

Unfortunately the 'rules:' entry had an unexpected side-effect on
the pipelines that was never previously noticed. Instead of only
running pipelines on push, the mere existance of the 'rules:' entry
caused triggering of pipelines on merge requests too.

The newly auto-generated ci/gitlab.yml file does not have a 'rules:'
for the container job template, and thus only runs on git push.

The result is that build jobs try to run on merge requests and the
container jobs they depend on don't exist. This breaks the entire
pipeline with a message that the config is invalid due to broken
job dependencies.

This fixes a regression introduced in

  commit ccc7a44adbea003d6a0dc2f156adb2856c28bd4c
  Author: Daniel P. Berrangé 
  Date:   Thu Sep 9 14:49:01 2021 +0100

ci: re-generate containers/gitlab config from manifest

Signed-off-by: Daniel P. Berrangé 
---
 .gitlab-ci.yml | 8 
 1 file changed, 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b396a1511d..d486faca58 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,10 +18,6 @@ include: '/ci/gitlab.yml'
 
 .native_build_job:
   extends: .gitlab_native_build_job
-  rules:
-- if: "$TEMPORARILY_DISABLED"
-  allow_failure: true
-- when: on_success
   cache:
 paths:
   - ccache/
@@ -45,10 +41,6 @@ include: '/ci/gitlab.yml'
 paths:
   - ccache/
 key: "$CI_JOB_NAME"
-  rules:
-- if: "$TEMPORARILY_DISABLED"
-  allow_failure: true
-- when: on_success
   before_script:
 - *script_variables
   script:
-- 
2.31.1