From b78ef5a594f3bc8c14a6232835d5b280acd66ce0 Mon Sep 17 00:00:00 2001
From: gitbot <gitbot@garz-fricke.com>
Date: Mon, 29 Aug 2022 17:15:32 +0000
Subject: [PATCH] Integrate gitlab-ci/multiple-integration-pipelines and 18
 more

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/8a38f19499ac4da8b34d66c04fd47fef771f3aa9

Put all manifest intgeration jobs into a single stage

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/a09564c18872553533d9bda0f17b2ac4a7dab812

deploy_gitlab_ci: explicitly pass gitlab-ci project and branch

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/172e762515357f7a60eb14468e15e301802a1600

Improve error messages

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/f0f5a370b5b150bfcb17af6e8c23fd63abf480b6

Improve naming of functions and variables

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/c8b484ca6e2cb3e5908431711f5c4b1b5098b7f2

Retrigger MRs from all integrating projects

Instead of getting the projects from the manifest file, search them via
their INTEGRATION variable.

Improve log messages on this occasion: print URL instead of just IDs.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/5e75bfc1cd59485f986291ec82085089815f42de

Deploy gitlab-ci to multiple branches

Add different integration jobs for different manifest branches. The
merge stage only has one job for each manifest, though, because
otherwise we cannot guarantee a consistent state for all branches.

Extend the deploy script for this purpose, so that it can deploy to
multiple manifest branches at once.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/771dcff178bafded033392503031fef8adf572bc

Fix temporary dir path

We were passing the complete TemporaryDirectory object to the repo clone
function instead of just the path string, resulting in the repo being
cloned into a local dir "<TemporaryDirectory '/tmp/tmphwakypf8'>".

Fix this to actually use the generated temp dir.

This change makes it necessary to keep the TemporaryDirectory object
reference until we don't need the directory anymore, otherwise it will
be removed immediately.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/dce219c8a5fd2bc7e1107a0237876a64d63dd5ff

Print less important output in grey color

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/5e36261dc27087dfb2fb0d0c0e7430cac66b90b9

deploy_gitlab_ci: remove hard-coded integration targets

Get targets dynamically using the INTEGRATION variable instead.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/94cd678101ba5fa37d5a8e3008f4c526bc2b5255

Recurse to child pipelines on retrigger

This makes it possible to retrigger jobs that are not part of the
given pipeline but in any nested child pipeline of it.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/fb1219a77ec96073c3e64563a91059d851dc03f8

Ignore __pycache__ in scripts directory

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/0c29c9954e7f9240f68aedd4a39acee41985dae9

Refactoring: rename arguments for consistency

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/d461090b8d5623d511fc113566f2b56064f00172

Remove hard coded project and branch variables

MANIFEST_PROJECT, MASTER_BRANCH_MANIFEST, MASTER_BRANCH_PROJECT

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/a4aae414a1f6403cce04c782c867daaaa3305c87

Add rules for integration pipeline

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/bfa38b2401bb84bdaa980a2b7a16e0e4c9dac1f0

Improve log messages

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/1c9670d97fb683292ae5d4272fd83ad23a46042a

commit_and_push: do not pass branch

Branch can be implicitly determined via the repo.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/767a4e2e821b9e6e5a58f0788b2ac40b3eb5dfae

Throw and catch exception if git push fails

Using new function raise_if_error() of GitPython 3.1.25:
https://gitpython.readthedocs.io/en/stable/tutorial.html#handling-remotes

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/399dd9f99d34709ca4baedfc070162a0c86bbe75

Create separate integration branches for each target branch

This makes it possible to integrate a project branch into different
branches of the same manifest project.

--

Commit: https://git.seco.com/seco-ne/yocto/infrastructure/gitlab-ci/-/commit/f117035190f46788a545cc9ff9be31450d3cfae0

Generate integration pipeline based on CI variable

Evaluate the INTEGRATION variable to determine target project and branch
for integration instead of using the hard-coded variables. For now this
works only for a single integration per target project because the
integration branch name does not include the target branch and hence
would be identical when trying to integrate into multiple branches of
the same project.
---
 .gitlab-ci     | 2 +-
 .gitlab-ci.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci b/.gitlab-ci
index 91dc115..8a38f19 160000
--- a/.gitlab-ci
+++ b/.gitlab-ci
@@ -1 +1 @@
-Subproject commit 91dc115a3aa08fdf5d48e0f88ef44661f85c90c2
+Subproject commit 8a38f19499ac4da8b34d66c04fd47fef771f3aa9
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 179a51a..1176a52 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,7 @@
 # ---------------------------------------------------------------------------------------
 include:
   - project: '${CI_PROJECT_ROOT_NAMESPACE}/yocto/infrastructure/gitlab-ci'
-    ref: 91dc115a3aa08fdf5d48e0f88ef44661f85c90c2
+    ref: 8a38f19499ac4da8b34d66c04fd47fef771f3aa9
     file: 'manifest-integration-yocto.yml'
 
 variables:
-- 
GitLab