[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/19] gitlab: Convert check-dco/check-patch jobs to the 'rules' s
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 18/19] gitlab: Convert check-dco/check-patch jobs to the 'rules' syntax |
Date: |
Wed, 26 May 2021 23:18:37 +0200 |
Per GitLab documentation [*]:
"rules replaces only/except and they can’t be used together
in the same job."
Since the 'rules' syntax is more powerful and we are already using
it, convert the check-dco/check-patch jobs so no job use the 'only/
except' syntax.
[*] https://docs.gitlab.com/ee/ci/yaml/#rules
Inspired-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210525132418.4133235-3-f4bug@amsat.org>
---
.gitlab-ci.d/static_checks.yml | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/.gitlab-ci.d/static_checks.yml b/.gitlab-ci.d/static_checks.yml
index 9c9a771b744..91247a6f670 100644
--- a/.gitlab-ci.d/static_checks.yml
+++ b/.gitlab-ci.d/static_checks.yml
@@ -4,12 +4,13 @@ check-patch:
needs:
job: amd64-centos8-container
script: .gitlab-ci.d/check-patch.py
- except:
- variables:
- - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH ==
$CI_DEFAULT_BRANCH
variables:
GIT_DEPTH: 1000
- allow_failure: true
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH ==
$CI_DEFAULT_BRANCH'
+ when: never
+ - when: on_success
+ allow_failure: true
check-dco:
stage: build
@@ -17,8 +18,9 @@ check-dco:
needs:
job: amd64-centos8-container
script: .gitlab-ci.d/check-dco.py
- except:
- variables:
- - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH ==
$CI_DEFAULT_BRANCH
variables:
GIT_DEPTH: 1000
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH ==
$CI_DEFAULT_BRANCH'
+ when: never
+ - when: on_success
--
2.26.3
- [PULL 08/19] gitlab: Extract default build/test jobs templates, (continued)
- [PULL 08/19] gitlab: Extract default build/test jobs templates, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 09/19] gitlab: Extract core container jobs to container-core.yml, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 10/19] gitlab: Drop linux user build job for CentOS 7, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 11/19] gitlab: Extract all default build/test jobs to buildtest.yml, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 12/19] gitlab: Move current job set to qemu-project.yml, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 13/19] gitlab: Document how forks can use different set of jobs, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 14/19] gitlab: Extract cross-container jobs to container-cross.yml, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 15/19] gitlab: Keep Avocado reports during 1 week, Philippe Mathieu-Daudé, 2021/05/26
- [PULL 16/19] gitlab: Run Avocado tests manually (except mainstream CI), Philippe Mathieu-Daudé, 2021/05/26
- [PULL 17/19] gitlab: Use $CI_DEFAULT_BRANCH instead of hardcoded 'master', Philippe Mathieu-Daudé, 2021/05/26
- [PULL 18/19] gitlab: Convert check-dco/check-patch jobs to the 'rules' syntax,
Philippe Mathieu-Daudé <=
- [PULL 19/19] gitlab: Split gprof-gcov job, Philippe Mathieu-Daudé, 2021/05/26
- Re: [PULL 00/19] gitlab-ci patches for 2021-05-26, Peter Maydell, 2021/05/27