All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions
@ 2021-07-26 15:04 Philippe Mathieu-Daudé
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-26 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Bin Meng, Philippe Mathieu-Daudé

Since v3:
- Unfortunately patch 4 v2 got merged as 0a9487d80af so
  rebase & reword.

Philippe Mathieu-Daudé (4):
  docs: Document GitLab custom CI/CD variables
  gitlab-ci: Fix 'when:' condition in acceptance_test_job_template
  gitlab-ci: Fix 'when:' condition in EDK2 jobs
  gitlab-ci: Fix 'when:' condition in OpenSBI jobs

 docs/devel/ci.rst                   | 40 +++++++++++++++++++++++++++++
 .gitlab-ci.d/buildtest-template.yml |  4 +--
 .gitlab-ci.d/edk2.yml               |  6 ++---
 .gitlab-ci.d/opensbi.yml            |  8 +++---
 .gitlab-ci.yml                      | 19 ++------------
 5 files changed, 51 insertions(+), 26 deletions(-)

-- 
2.31.1




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables
  2021-07-26 15:04 [PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions Philippe Mathieu-Daudé
@ 2021-07-26 15:04 ` Philippe Mathieu-Daudé
  2021-07-26 19:38   ` Willian Rampazzo
  2021-07-27  5:59   ` Thomas Huth
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-26 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé,
	Thomas Huth, Bin Meng, Philippe Mathieu-Daudé

We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf
("gitlab: Run Avocado tests manually (except mainstream CI)"), but
forgot to document it properly. Do it now.

Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml    | 19 ++-----------------
 2 files changed, 42 insertions(+), 17 deletions(-)

diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst
index b3bf3ef615b..53df04afb7f 100644
--- a/docs/devel/ci.rst
+++ b/docs/devel/ci.rst
@@ -8,6 +8,46 @@ found at::
 
    https://wiki.qemu.org/Testing/CI
 
+Custom CI/CD variables
+======================
+
+QEMU CI pipelines can be tuned setting some CI environment variables.
+
+Set variable globally in the user's CI namespace
+------------------------------------------------
+
+Variables can be set globally in the user's CI namespace setting.
+
+For further information about how to set these variables, please refer to::
+
+  https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
+
+Set variable manually when pushing a branch or tag to the user's repository
+---------------------------------------------------------------------------
+
+Variables can be set manually when pushing a branch or tag, using
+git-push command line arguments.
+
+Example setting the QEMU_CI_EXAMPLE_VAR variable:
+
+.. code::
+
+   git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch
+
+For further information about how to set these variables, please refer to::
+
+  https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
+
+Here is a list of the most used variables:
+
+QEMU_CI_AVOCADO_TESTING
+~~~~~~~~~~~~~~~~~~~~~~~
+By default, tests using the Avocado framework are not run automatically in
+the pipelines (because multiple artifacts have to be downloaded, and if
+these artifacts are not already cached, downloading them make the jobs
+reach the timeout limit). Set this variable to have the tests using the
+Avocado framework run automatically.
+
 Jobs on Custom Runners
 ======================
 
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6dc5385e697..9762dda2ee3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,24 +16,9 @@
 # QEMU CI jobs are based on templates. Some templates provide
 # user-configurable options, modifiable via configuration variables.
 #
-# These variables can be set globally in the user's CI namespace
-# setting:
-# https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
-# or set manually each time a branch/tag is pushed, as a git-push
-# command line argument:
-# https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
+# See https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-variables
+# for more information.
 #
-# Example setting the QEMU_CI_EXAMPLE_VAR variable:
-#
-#   git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch
-#
-# ----------------------------------------------------------------------
-#
-# List of environment variables that can be use to modify the set
-# of jobs selected:
-#
-# - QEMU_CI_AVOCADO_TESTING
-#   If set, tests using the Avocado framework will be run
 
 include:
   - local: '/.gitlab-ci.d/qemu-project.yml'
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template
  2021-07-26 15:04 [PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions Philippe Mathieu-Daudé
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables Philippe Mathieu-Daudé
@ 2021-07-26 15:04 ` Philippe Mathieu-Daudé
  2021-07-26 19:39   ` Willian Rampazzo
  2021-07-27  6:05   ` Thomas Huth
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs Philippe Mathieu-Daudé
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 4/4] gitlab-ci: Fix 'when:' condition in OpenSBI jobs Philippe Mathieu-Daudé
  3 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-26 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé,
	Thomas Huth, Bin Meng, Philippe Mathieu-Daudé

Jobs depending on another should not use the 'when: always'
condition, because if a dependency failed we should not keep
running jobs depending on it. The correct condition is
'when: on_success'.

Fixes: f56bf4caf71 ("gitlab: Run Avocado tests manually (except mainstream CI)")
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .gitlab-ci.d/buildtest-template.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 3e3e19d96bd..fcbcc4e627a 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -73,9 +73,9 @@
     # in its namespace setting or via git-push option, see documentation
     # in /.gitlab-ci.yml of this repository).
     - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
-      when: always
+      when: on_success
     - if: '$QEMU_CI_AVOCADO_TESTING'
-      when: always
+      when: on_success
     # Otherwise, set to manual (the jobs are created but not run).
     - when: manual
       allow_failure: true
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs
  2021-07-26 15:04 [PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions Philippe Mathieu-Daudé
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables Philippe Mathieu-Daudé
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template Philippe Mathieu-Daudé
@ 2021-07-26 15:04 ` Philippe Mathieu-Daudé
  2021-07-26 19:40   ` Willian Rampazzo
  2021-07-27  6:08   ` Thomas Huth
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 4/4] gitlab-ci: Fix 'when:' condition in OpenSBI jobs Philippe Mathieu-Daudé
  3 siblings, 2 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-26 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé,
	Thomas Huth, Bin Meng, Philippe Mathieu-Daudé

Jobs depending on another should not use the 'when: always'
condition, because if a dependency failed we should not keep
running jobs depending on it. The correct condition is
'when: on_success'.

Fixes: 71920809cea ("gitlab-ci.yml: Add jobs to build EDK2 firmware binaries")
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .gitlab-ci.d/edk2.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml
index aae2f7ad880..62497ba47fb 100644
--- a/.gitlab-ci.d/edk2.yml
+++ b/.gitlab-ci.d/edk2.yml
@@ -8,11 +8,11 @@
    - .gitlab-ci.d/edk2/Dockerfile
    # or roms/edk2/ is modified (submodule updated)
    - roms/edk2/*
-   when: always
+   when: on_success
  - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
-   when: always
+   when: on_success
  - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
-   when: always
+   when: on_success
 
 docker-edk2:
  extends: .edk2_job_rules
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH-for-6.1 v4 4/4] gitlab-ci: Fix 'when:' condition in OpenSBI jobs
  2021-07-26 15:04 [PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs Philippe Mathieu-Daudé
@ 2021-07-26 15:04 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-26 15:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P . Berrangé,
	Thomas Huth, Bin Meng, Philippe Mathieu-Daudé

Jobs depending on another should not use the 'when: always'
condition, because if a dependency failed we should not keep
running jobs depending on it. The correct condition is
'when: on_success'.

Fixes: c6fc0fc1a71 ("gitlab-ci.yml: Add jobs to build OpenSBI firmware binaries")
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .gitlab-ci.d/opensbi.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml
index d8a0456679e..5e0a2477c5d 100644
--- a/.gitlab-ci.d/opensbi.yml
+++ b/.gitlab-ci.d/opensbi.yml
@@ -6,14 +6,14 @@
    - .gitlab-ci.d/opensbi.yml
    # or the Dockerfile is modified
    - .gitlab-ci.d/opensbi/Dockerfile
-   when: always
+   when: on_success
  - changes: # or roms/opensbi/ is modified (submodule updated)
    - roms/opensbi/*
-   when: always
+   when: on_success
  - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/' # or the branch/tag starts with 'opensbi'
-   when: always
+   when: on_success
  - if: '$CI_COMMIT_MESSAGE =~ /opensbi/i' # or last commit description contains 'OpenSBI'
-   when: always
+   when: on_success
 
 docker-opensbi:
  extends: .opensbi_job_rules
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables Philippe Mathieu-Daudé
@ 2021-07-26 19:38   ` Willian Rampazzo
  2021-07-27  5:59   ` Thomas Huth
  1 sibling, 0 replies; 14+ messages in thread
From: Willian Rampazzo @ 2021-07-26 19:38 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Bin Meng, Daniel P . Berrangé, qemu-devel

On Mon, Jul 26, 2021 at 12:08 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf
> ("gitlab: Run Avocado tests manually (except mainstream CI)"), but
> forgot to document it properly. Do it now.
>
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++
>  .gitlab-ci.yml    | 19 ++-----------------
>  2 files changed, 42 insertions(+), 17 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template Philippe Mathieu-Daudé
@ 2021-07-26 19:39   ` Willian Rampazzo
  2021-07-27  6:05   ` Thomas Huth
  1 sibling, 0 replies; 14+ messages in thread
From: Willian Rampazzo @ 2021-07-26 19:39 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Bin Meng, Daniel P . Berrangé, qemu-devel

On Mon, Jul 26, 2021 at 12:06 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Jobs depending on another should not use the 'when: always'
> condition, because if a dependency failed we should not keep
> running jobs depending on it. The correct condition is
> 'when: on_success'.
>
> Fixes: f56bf4caf71 ("gitlab: Run Avocado tests manually (except mainstream CI)")
> Reported-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  .gitlab-ci.d/buildtest-template.yml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs Philippe Mathieu-Daudé
@ 2021-07-26 19:40   ` Willian Rampazzo
  2021-07-27  6:08   ` Thomas Huth
  1 sibling, 0 replies; 14+ messages in thread
From: Willian Rampazzo @ 2021-07-26 19:40 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Bin Meng, Daniel P . Berrangé, qemu-devel

On Mon, Jul 26, 2021 at 12:07 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Jobs depending on another should not use the 'when: always'
> condition, because if a dependency failed we should not keep
> running jobs depending on it. The correct condition is
> 'when: on_success'.
>
> Fixes: 71920809cea ("gitlab-ci.yml: Add jobs to build EDK2 firmware binaries")
> Reported-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  .gitlab-ci.d/edk2.yml | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables Philippe Mathieu-Daudé
  2021-07-26 19:38   ` Willian Rampazzo
@ 2021-07-27  5:59   ` Thomas Huth
  2021-07-27  7:55     ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 14+ messages in thread
From: Thomas Huth @ 2021-07-27  5:59 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Bin Meng, Daniel P . Berrangé

On 26/07/2021 17.04, Philippe Mathieu-Daudé wrote:
> We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf
> ("gitlab: Run Avocado tests manually (except mainstream CI)"), but
> forgot to document it properly. Do it now.
> 
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++
>   .gitlab-ci.yml    | 19 ++-----------------
>   2 files changed, 42 insertions(+), 17 deletions(-)
> 
> diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst
> index b3bf3ef615b..53df04afb7f 100644
> --- a/docs/devel/ci.rst
> +++ b/docs/devel/ci.rst
> @@ -8,6 +8,46 @@ found at::
>   
>      https://wiki.qemu.org/Testing/CI
>   
> +Custom CI/CD variables
> +======================
> +
> +QEMU CI pipelines can be tuned setting some CI environment variables.

"tuned *by* setting" ?

> +
> +Set variable globally in the user's CI namespace
> +------------------------------------------------
> +
> +Variables can be set globally in the user's CI namespace setting.
> +
> +For further information about how to set these variables, please refer to::
> +
> +  https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui

The anchor does not seem to exist anymore?

> +Set variable manually when pushing a branch or tag to the user's repository
> +---------------------------------------------------------------------------
> +
> +Variables can be set manually when pushing a branch or tag, using
> +git-push command line arguments.
> +
> +Example setting the QEMU_CI_EXAMPLE_VAR variable:
> +
> +.. code::
> +
> +   git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch
> +
> +For further information about how to set these variables, please refer to::
> +
> +  https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
> +
> +Here is a list of the most used variables:
> +
> +QEMU_CI_AVOCADO_TESTING
> +~~~~~~~~~~~~~~~~~~~~~~~
> +By default, tests using the Avocado framework are not run automatically in
> +the pipelines (because multiple artifacts have to be downloaded, and if
> +these artifacts are not already cached, downloading them make the jobs
> +reach the timeout limit). Set this variable to have the tests using the
> +Avocado framework run automatically.
> +
>   Jobs on Custom Runners
>   ======================
>   
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 6dc5385e697..9762dda2ee3 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -16,24 +16,9 @@
>   # QEMU CI jobs are based on templates. Some templates provide
>   # user-configurable options, modifiable via configuration variables.
>   #
> -# These variables can be set globally in the user's CI namespace
> -# setting:
> -# https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
> -# or set manually each time a branch/tag is pushed, as a git-push
> -# command line argument:
> -# https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
> +# See https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-variables
> +# for more information.
>   #
> -# Example setting the QEMU_CI_EXAMPLE_VAR variable:
> -#
> -#   git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch
> -#
> -# ----------------------------------------------------------------------
> -#
> -# List of environment variables that can be use to modify the set
> -# of jobs selected:
> -#
> -# - QEMU_CI_AVOCADO_TESTING
> -#   If set, tests using the Avocado framework will be run
>   
>   include:
>     - local: '/.gitlab-ci.d/qemu-project.yml'
> 

With the two issues above fixed:
Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template Philippe Mathieu-Daudé
  2021-07-26 19:39   ` Willian Rampazzo
@ 2021-07-27  6:05   ` Thomas Huth
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2021-07-27  6:05 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Bin Meng, Daniel P . Berrangé

On 26/07/2021 17.04, Philippe Mathieu-Daudé wrote:
> Jobs depending on another should not use the 'when: always'
> condition, because if a dependency failed we should not keep
> running jobs depending on it. The correct condition is
> 'when: on_success'.
> 
> Fixes: f56bf4caf71 ("gitlab: Run Avocado tests manually (except mainstream CI)")
> Reported-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   .gitlab-ci.d/buildtest-template.yml | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
> index 3e3e19d96bd..fcbcc4e627a 100644
> --- a/.gitlab-ci.d/buildtest-template.yml
> +++ b/.gitlab-ci.d/buildtest-template.yml
> @@ -73,9 +73,9 @@
>       # in its namespace setting or via git-push option, see documentation
>       # in /.gitlab-ci.yml of this repository).
>       - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
> -      when: always
> +      when: on_success
>       - if: '$QEMU_CI_AVOCADO_TESTING'
> -      when: always
> +      when: on_success
>       # Otherwise, set to manual (the jobs are created but not run).
>       - when: manual
>         allow_failure: true
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs
  2021-07-26 15:04 ` [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs Philippe Mathieu-Daudé
  2021-07-26 19:40   ` Willian Rampazzo
@ 2021-07-27  6:08   ` Thomas Huth
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2021-07-27  6:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Bin Meng, Daniel P . Berrangé

On 26/07/2021 17.04, Philippe Mathieu-Daudé wrote:
> Jobs depending on another should not use the 'when: always'
> condition, because if a dependency failed we should not keep
> running jobs depending on it. The correct condition is
> 'when: on_success'.
> 
> Fixes: 71920809cea ("gitlab-ci.yml: Add jobs to build EDK2 firmware binaries")
> Reported-by: Daniel P. Berrangé <berrange@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   .gitlab-ci.d/edk2.yml | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml
> index aae2f7ad880..62497ba47fb 100644
> --- a/.gitlab-ci.d/edk2.yml
> +++ b/.gitlab-ci.d/edk2.yml
> @@ -8,11 +8,11 @@
>      - .gitlab-ci.d/edk2/Dockerfile
>      # or roms/edk2/ is modified (submodule updated)
>      - roms/edk2/*
> -   when: always
> +   when: on_success
>    - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 'edk2'
> -   when: always
> +   when: on_success
>    - if: '$CI_COMMIT_MESSAGE =~ /edk2/i' # or last commit description contains 'EDK2'
> -   when: always
> +   when: on_success
>   
>   docker-edk2:
>    extends: .edk2_job_rules

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables
  2021-07-27  5:59   ` Thomas Huth
@ 2021-07-27  7:55     ` Philippe Mathieu-Daudé
  2021-07-27  8:09       ` Thomas Huth
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-27  7:55 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: Bin Meng, Daniel P . Berrangé

On 7/27/21 7:59 AM, Thomas Huth wrote:
> On 26/07/2021 17.04, Philippe Mathieu-Daudé wrote:
>> We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf
>> ("gitlab: Run Avocado tests manually (except mainstream CI)"), but
>> forgot to document it properly. Do it now.
>>
>> Suggested-by: Thomas Huth <thuth@redhat.com>
>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++
>>   .gitlab-ci.yml    | 19 ++-----------------
>>   2 files changed, 42 insertions(+), 17 deletions(-)
>>
>> diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst
>> index b3bf3ef615b..53df04afb7f 100644
>> --- a/docs/devel/ci.rst
>> +++ b/docs/devel/ci.rst
>> @@ -8,6 +8,46 @@ found at::
>>        https://wiki.qemu.org/Testing/CI
>>   +Custom CI/CD variables
>> +======================

[*]

>> +
>> +QEMU CI pipelines can be tuned setting some CI environment variables.
> 
> "tuned *by* setting" ?

OK.

> 
>> +
>> +Set variable globally in the user's CI namespace
>> +------------------------------------------------
>> +
>> +Variables can be set globally in the user's CI namespace setting.
>> +
>> +For further information about how to set these variables, please
>> refer to::
>> +
>> + 
>> https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
>>
> 
> The anchor does not seem to exist anymore?

It will exist once this patch get merged, see [*] ;)

> 
>> +Set variable manually when pushing a branch or tag to the user's
>> repository
>> +---------------------------------------------------------------------------
>>
>> +
>> +Variables can be set manually when pushing a branch or tag, using
>> +git-push command line arguments.
>> +
>> +Example setting the QEMU_CI_EXAMPLE_VAR variable:
>> +
>> +.. code::
>> +
>> +   git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch
>> +
>> +For further information about how to set these variables, please
>> refer to::
>> +
>> + 
>> https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
>>
>> +
>> +Here is a list of the most used variables:
>> +
>> +QEMU_CI_AVOCADO_TESTING
>> +~~~~~~~~~~~~~~~~~~~~~~~
>> +By default, tests using the Avocado framework are not run
>> automatically in
>> +the pipelines (because multiple artifacts have to be downloaded, and if
>> +these artifacts are not already cached, downloading them make the jobs
>> +reach the timeout limit). Set this variable to have the tests using the
>> +Avocado framework run automatically.
>> +
>>   Jobs on Custom Runners
>>   ======================
>>   diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
>> index 6dc5385e697..9762dda2ee3 100644
>> --- a/.gitlab-ci.yml
>> +++ b/.gitlab-ci.yml
>> @@ -16,24 +16,9 @@
>>   # QEMU CI jobs are based on templates. Some templates provide
>>   # user-configurable options, modifiable via configuration variables.
>>   #
>> -# These variables can be set globally in the user's CI namespace
>> -# setting:
>> -#
>> https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
>>
>> -# or set manually each time a branch/tag is pushed, as a git-push
>> -# command line argument:
>> -#
>> https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
>>
>> +# See
>> https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-variables
>> +# for more information.
>>   #
>> -# Example setting the QEMU_CI_EXAMPLE_VAR variable:
>> -#
>> -#   git push -o ci.variable="QEMU_CI_EXAMPLE_VAR=value" myrepo mybranch
>> -#
>> -# ----------------------------------------------------------------------
>> -#
>> -# List of environment variables that can be use to modify the set
>> -# of jobs selected:
>> -#
>> -# - QEMU_CI_AVOCADO_TESTING
>> -#   If set, tests using the Avocado framework will be run
>>     include:
>>     - local: '/.gitlab-ci.d/qemu-project.yml'
>>
> 
> With the two issues above fixed:
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables
  2021-07-27  7:55     ` Philippe Mathieu-Daudé
@ 2021-07-27  8:09       ` Thomas Huth
  2021-07-27  8:32         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Huth @ 2021-07-27  8:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Bin Meng, Daniel P . Berrangé

On 27/07/2021 09.55, Philippe Mathieu-Daudé wrote:
> On 7/27/21 7:59 AM, Thomas Huth wrote:
>> On 26/07/2021 17.04, Philippe Mathieu-Daudé wrote:
>>> We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf
>>> ("gitlab: Run Avocado tests manually (except mainstream CI)"), but
>>> forgot to document it properly. Do it now.
>>>
>>> Suggested-by: Thomas Huth <thuth@redhat.com>
>>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>>    docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++
>>>    .gitlab-ci.yml    | 19 ++-----------------
>>>    2 files changed, 42 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst
>>> index b3bf3ef615b..53df04afb7f 100644
>>> --- a/docs/devel/ci.rst
>>> +++ b/docs/devel/ci.rst
>>> @@ -8,6 +8,46 @@ found at::
>>>         https://wiki.qemu.org/Testing/CI
>>>    +Custom CI/CD variables
>>> +======================
> 
> [*]
> 
>>> +
>>> +QEMU CI pipelines can be tuned setting some CI environment variables.
>>
>> "tuned *by* setting" ?
> 
> OK.
> 
>>
>>> +
>>> +Set variable globally in the user's CI namespace
>>> +------------------------------------------------
>>> +
>>> +Variables can be set globally in the user's CI namespace setting.
>>> +
>>> +For further information about how to set these variables, please
>>> refer to::
>>> +
>>> +
>>> https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
>>>
>>
>> The anchor does not seem to exist anymore?
> 
> It will exist once this patch get merged, see [*] ;)

The above URL points to the official gitlab documentation...

>>> index 6dc5385e697..9762dda2ee3 100644
>>> --- a/.gitlab-ci.yml
>>> +++ b/.gitlab-ci.yml
>>> @@ -16,24 +16,9 @@
>>>    # QEMU CI jobs are based on templates. Some templates provide
>>>    # user-configurable options, modifiable via configuration variables.
>>>    #
>>> -# These variables can be set globally in the user's CI namespace
>>> -# setting:
>>> -#
>>> https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
>>>
>>> -# or set manually each time a branch/tag is pushed, as a git-push
>>> -# command line argument:
>>> -#
>>> https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
>>>
>>> +# See
>>> https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-variables
>>> +# for more information.

... and not to the new one here. I think you mixed that up.

  Thomas



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables
  2021-07-27  8:09       ` Thomas Huth
@ 2021-07-27  8:32         ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-07-27  8:32 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: Bin Meng, Daniel P . Berrangé

On 7/27/21 10:09 AM, Thomas Huth wrote:
> On 27/07/2021 09.55, Philippe Mathieu-Daudé wrote:
>> On 7/27/21 7:59 AM, Thomas Huth wrote:
>>> On 26/07/2021 17.04, Philippe Mathieu-Daudé wrote:
>>>> We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf
>>>> ("gitlab: Run Avocado tests manually (except mainstream CI)"), but
>>>> forgot to document it properly. Do it now.
>>>>
>>>> Suggested-by: Thomas Huth <thuth@redhat.com>
>>>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>> ---
>>>>    docs/devel/ci.rst | 40 ++++++++++++++++++++++++++++++++++++++++
>>>>    .gitlab-ci.yml    | 19 ++-----------------
>>>>    2 files changed, 42 insertions(+), 17 deletions(-)
>>>>
>>>> diff --git a/docs/devel/ci.rst b/docs/devel/ci.rst
>>>> index b3bf3ef615b..53df04afb7f 100644
>>>> --- a/docs/devel/ci.rst
>>>> +++ b/docs/devel/ci.rst
>>>> @@ -8,6 +8,46 @@ found at::
>>>>         https://wiki.qemu.org/Testing/CI
>>>>    +Custom CI/CD variables
>>>> +======================
>>
>> [*]
>>
>>>> +
>>>> +QEMU CI pipelines can be tuned setting some CI environment variables.
>>>
>>> "tuned *by* setting" ?
>>
>> OK.
>>
>>>
>>>> +
>>>> +Set variable globally in the user's CI namespace
>>>> +------------------------------------------------
>>>> +
>>>> +Variables can be set globally in the user's CI namespace setting.
>>>> +
>>>> +For further information about how to set these variables, please
>>>> refer to::
>>>> +
>>>> +
>>>> https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
>>>>
>>>>
>>>
>>> The anchor does not seem to exist anymore?
>>
>> It will exist once this patch get merged, see [*] ;)
> 
> The above URL points to the official gitlab documentation...
> 
>>>> index 6dc5385e697..9762dda2ee3 100644
>>>> --- a/.gitlab-ci.yml
>>>> +++ b/.gitlab-ci.yml
>>>> @@ -16,24 +16,9 @@
>>>>    # QEMU CI jobs are based on templates. Some templates provide
>>>>    # user-configurable options, modifiable via configuration variables.
>>>>    #
>>>> -# These variables can be set globally in the user's CI namespace
>>>> -# setting:
>>>> -#
>>>> https://docs.gitlab.com/ee/ci/variables/#create-a-custom-variable-in-the-ui
>>>>
>>>>
>>>> -# or set manually each time a branch/tag is pushed, as a git-push
>>>> -# command line argument:
>>>> -#
>>>> https://docs.gitlab.com/ee/user/project/push_options.html#push-options-for-gitlab-cicd
>>>>
>>>>
>>>> +# See
>>>> https://qemu-project.gitlab.io/qemu/devel/ci.html#custom-ci-cd-variables
>>>>
>>>> +# for more information.
> 
> ... and not to the new one here. I think you mixed that up.

Oops, thanks for double-checking!



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-07-27  8:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 15:04 [PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions Philippe Mathieu-Daudé
2021-07-26 15:04 ` [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables Philippe Mathieu-Daudé
2021-07-26 19:38   ` Willian Rampazzo
2021-07-27  5:59   ` Thomas Huth
2021-07-27  7:55     ` Philippe Mathieu-Daudé
2021-07-27  8:09       ` Thomas Huth
2021-07-27  8:32         ` Philippe Mathieu-Daudé
2021-07-26 15:04 ` [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template Philippe Mathieu-Daudé
2021-07-26 19:39   ` Willian Rampazzo
2021-07-27  6:05   ` Thomas Huth
2021-07-26 15:04 ` [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs Philippe Mathieu-Daudé
2021-07-26 19:40   ` Willian Rampazzo
2021-07-27  6:08   ` Thomas Huth
2021-07-26 15:04 ` [PATCH-for-6.1 v4 4/4] gitlab-ci: Fix 'when:' condition in OpenSBI jobs Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.