From 39b95eae18f2774c1ea1b4e48d9353f97897999e Mon Sep 17 00:00:00 2001 From: gitbot <gitbot@seco.com> Date: Thu, 19 Oct 2023 12:39:52 +0000 Subject: [PATCH] Integrate gitlab-ci/reverse-pipeline-cancellation-order and 6 more -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/3697b4ea6a1610772369cb1559cd810502b51029 cancel_pipelines: reverse order of cancellation Cancel parent pipeline first before cancelling its children in order not to have failed parent pipelines (trigger jobs are failed if their downstream pipeline is cancelled). -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/5f4ca2fbb3cbf8dd7cc4d1817ad107c89971a230 cancel_pipelines: list actually cancelled (child-)pipelines -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/c80cba846b022eb2a074ae4ec5711a094755b246 Cancel all pipelines on newer commit We already canceled running pipelines before. Gitlab, however, might have already canceled previous pipelines automatically, but without canceling their child pipelines. Remove the "running" status filter when cancelling pipelines, so that also already cancelled pipelines will be included. -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/84eb6e22684cf2878dbb4a8e78b8a3ad448a1f21 Revert "Cancel all pipelines on newer commit" This reverts commit f7582b74e7c565d55bb8a0315fe75c4ab4385fa2. -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/f7582b74e7c565d55bb8a0315fe75c4ab4385fa2 Cancel all pipelines on newer commit We already canceled running pipelines before. Gitlab, however, might have already canceled previous pipelines automatically, but without canceling their child pipelines. Extend the mechanism now to cancel all pipelines up to and including "running" as well as "canceled" states. -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/0ec55c07a3398c13af5aefdaacb02ca0bf5c4142 Fix list() call in update_submodule Here we don't just iterate over the results, so we have to use "all=True" instead of "as_list=False". See previous commit for explaination. -- Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/4b3a517e57cec00402031740eba300250e810213 Make sure to get all items on Gitlab list() calls The list() call on Gitlab classes uses pagination per default. If the number of items exceeds a certain limit, we only get a part of the results. We can pass "all=True" to the calls in order to disable pagination and get all results. If we're looping over the items, though, the recommended way of getting them is to use a generator object, which works calling list() with "as_list=False". See documentation for reference: https://python-gitlab.readthedocs.io/en/v2.10.1/api-usage.html#pagination Note: the "as_list" argument is deprecated in newer versions of the python-gitlab library, in favor of the newer "iterator=True": https://python-gitlab.readthedocs.io/en/v3.6.0/changelog.html#feature We are using v2.10.1 of the library, though, so this commit also updates calls using the new way, which is not working with our version. --- .gitlab-ci | 2 +- .gitlab-ci.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci b/.gitlab-ci index c292d14..3697b4e 160000 --- a/.gitlab-ci +++ b/.gitlab-ci @@ -1 +1 @@ -Subproject commit c292d1447f500262d733df620d291333ceed4a7b +Subproject commit 3697b4ea6a1610772369cb1559cd810502b51029 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25dec12..c3d8f7a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,9 +4,9 @@ # --------------------------------------------------------------------------------------- include: - project: '${CI_PROJECT_ROOT_NAMESPACE}/yocto/infrastructure/gitlab-ci' - ref: c292d1447f500262d733df620d291333ceed4a7b + ref: 3697b4ea6a1610772369cb1559cd810502b51029 file: 'manifest-integration.yml' variables: - GITLAB_CI_REVISION: c292d1447f500262d733df620d291333ceed4a7b + GITLAB_CI_REVISION: 3697b4ea6a1610772369cb1559cd810502b51029 BB_RECIPE_NAME: secure-element-examples -- GitLab