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

--

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

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/8840fc7e2dbeccb91fccc15ece507cdf24d858b5

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/b50c9ace0cad7ab2beef070535c4e68cf5da9c06

Print less important output in grey color

--

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

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/02683cc1dc898a138634b11d03b7d6e65155148f

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/0efe0f897615011f2a4fa1e1b97c41ad75ed2573

Ignore __pycache__ in scripts directory

--

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

Refactoring: rename arguments for consistency

--

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

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/68bd12000f40a93533f839f01f44dd0659517599

Add rules for integration pipeline

--

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

Improve log messages

--

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

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/f462d140919fb0f508501a9d94d4b70df0f741b4

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/892c12fe363d66e63757ec4214d27c87dd82fde9

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/77f767c1ab15ffa4fa5a39d9a563ec063d1f8af3

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.

--

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

CI: prepare to work also with renamed machine names lime seco-mx6
---
 .gitlab-ci     | 2 +-
 .gitlab-ci.yml | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci b/.gitlab-ci
index ef08f4e..2c19f7e 160000
--- a/.gitlab-ci
+++ b/.gitlab-ci
@@ -1 +1 @@
-Subproject commit ef08f4efda5cd346d8750db962bb6dfd066dc3f7
+Subproject commit 2c19f7ede2a689e14619908df1cea34a975be721
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index db9fd3d..a65f94d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,9 +4,13 @@
 # ---------------------------------------------------------------------------------------
 include:
   - project: '${CI_PROJECT_ROOT_NAMESPACE}/yocto/infrastructure/gitlab-ci'
-    ref: ef08f4efda5cd346d8750db962bb6dfd066dc3f7
+    ref: 2c19f7ede2a689e14619908df1cea34a975be721
     file: 'manifest-integration-yocto.yml'
 
 variables:
-  MASTER_BRANCH_PROJECT: master
+  GITLAB_CI_REVISION: 2c19f7ede2a689e14619908df1cea34a975be721
   BB_RECIPE_NAME: qt-multi-screen-compositor
+  # FIXME: This is only necessary due to the following GitLab limitation:
+  # https://gitlab.com/gitlab-org/gitlab/-/issues/209904
+  # As soon as this gets fixed upstream, the hard-coded branch name should be removed.
+  MASTER_BRANCH: master
-- 
GitLab