Skip to content
Snippets Groups Projects
Commit 13297ec7 authored by GitBot's avatar GitBot
Browse files

Integrate gitlab-ci/reverse-pipeline-cancellation-order and 6 more

--

Commit: seco-ne/yocto/infrastructure/gitlab-ci@3697b4ea

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: seco-ne/yocto/infrastructure/gitlab-ci@5f4ca2fb

cancel_pipelines: list actually cancelled (child-)pipelines

--

Commit: seco-ne/yocto/infrastructure/gitlab-ci@c80cba84

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: seco-ne/yocto/infrastructure/gitlab-ci@84eb6e22

Revert "Cancel all pipelines on newer commit"

This reverts commit f7582b74e7c565d55bb8a0315fe75c4ab4385fa2.

--

Commit: seco-ne/yocto/infrastructure/gitlab-ci@f7582b74

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: seco-ne/yocto/infrastructure/gitlab-ci@0ec55c07

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: seco-ne/yocto/infrastructure/gitlab-ci@4b3a517e

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.
parent 9bfd91ab
No related branches found
No related tags found
1 merge request!257Integrate gitlab-ci/reverse-pipeline-cancellation-order and 6 more
Pipeline #87813 passed with stage
in 13 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment