Re: [PATCH 1/2] drm/ci: pick up -external-fixes from the merge target repo

2023-10-26 Thread Maxime Ripard
On Sun, 08 Oct 2023 16:23:19 +0300, Dmitry Baryshkov wrote:
> In case of the merge requests it might be useful to push repo-specific
> fixes which have not yet propagated to the -external-fixes branch in the
> main UPSTREAM_REPO. For example, in case of drm/msm development, we are
> staging fixes locally for testing, before pushing them to the drm/drm
> repo. Thus, if the CI run was triggered by merge request, also pick up
> the -external fixes basing on the the CI_MERGE target repo / and branch.
> 
> [...]

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime



Re: [PATCH 1/2] drm/ci: pick up -external-fixes from the merge target repo

2023-10-19 Thread Helen Koike




On 08/10/2023 10:23, Dmitry Baryshkov wrote:

In case of the merge requests it might be useful to push repo-specific
fixes which have not yet propagated to the -external-fixes branch in the
main UPSTREAM_REPO. For example, in case of drm/msm development, we are
staging fixes locally for testing, before pushing them to the drm/drm
repo. Thus, if the CI run was triggered by merge request, also pick up
the -external fixes basing on the the CI_MERGE target repo / and branch.

Signed-off-by: Dmitry Baryshkov 


Acked-by: Helen Koike 

Thanks!


---
  drivers/gpu/drm/ci/build.sh | 5 +
  1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index 7b014287a041..20a6ba8a7b04 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -64,10 +64,15 @@ if [ "$(git ls-remote --exit-code --heads ${UPSTREAM_REPO} 
${TARGET_BRANCH}-exte
  fi
  
  # Try to merge fixes from local repo if this isn't a merge request

+# otherwise try merging the fixes from the merge target
  if [ -z "$CI_MERGE_REQUEST_PROJECT_PATH" ]; then
  if [ "$(git ls-remote --exit-code --heads origin 
${TARGET_BRANCH}-external-fixes)" ]; then
  git pull origin ${TARGET_BRANCH}-external-fixes
  fi
+else
+if [ "$(git ls-remote --exit-code --heads ${CI_MERGE_REQUEST_PROJECT_URL} 
${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}-external-fixes)" ]; then
+git pull ${CI_MERGE_REQUEST_PROJECT_URL} 
${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}-external-fixes
+fi
  fi
  
  for opt in $ENABLE_KCONFIGS; do


[PATCH 1/2] drm/ci: pick up -external-fixes from the merge target repo

2023-10-08 Thread Dmitry Baryshkov
In case of the merge requests it might be useful to push repo-specific
fixes which have not yet propagated to the -external-fixes branch in the
main UPSTREAM_REPO. For example, in case of drm/msm development, we are
staging fixes locally for testing, before pushing them to the drm/drm
repo. Thus, if the CI run was triggered by merge request, also pick up
the -external fixes basing on the the CI_MERGE target repo / and branch.

Signed-off-by: Dmitry Baryshkov 
---
 drivers/gpu/drm/ci/build.sh | 5 +
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index 7b014287a041..20a6ba8a7b04 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -64,10 +64,15 @@ if [ "$(git ls-remote --exit-code --heads ${UPSTREAM_REPO} 
${TARGET_BRANCH}-exte
 fi
 
 # Try to merge fixes from local repo if this isn't a merge request
+# otherwise try merging the fixes from the merge target
 if [ -z "$CI_MERGE_REQUEST_PROJECT_PATH" ]; then
 if [ "$(git ls-remote --exit-code --heads origin 
${TARGET_BRANCH}-external-fixes)" ]; then
 git pull origin ${TARGET_BRANCH}-external-fixes
 fi
+else
+if [ "$(git ls-remote --exit-code --heads ${CI_MERGE_REQUEST_PROJECT_URL} 
${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}-external-fixes)" ]; then
+git pull ${CI_MERGE_REQUEST_PROJECT_URL} 
${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}-external-fixes
+fi
 fi
 
 for opt in $ENABLE_KCONFIGS; do
-- 
2.40.1