Skip to content

Commit 5a59500

Browse files
Merge pull request #21 from scheduleonce/Ultragroots/ONCEHUB-49478
Ultragroots/ONCEHUB-49478 adding merge status to staging-app2
2 parents e5d35e8 + 400cf05 commit 5a59500

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.lighthouse/jenkins-x/pullrequest.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,30 @@ spec:
196196
fi
197197
image: ghcr.io/jenkins-x/builder-jx:2.1.155-779
198198
name: check-merge-disabled
199+
- script: |
200+
#!/usr/bin/env bash
201+
TARGET_BRANCH='staging-app2'
202+
if [[ $TARGET_BRANCH == $PULL_BASE_REF ]]; then
203+
mkdir clean_merge_test
204+
cd clean_merge_test
205+
git clone "https://github.com/scheduleonce/eslint-config-oncehub.git"
206+
cd eslint-config-oncehub
207+
git fetch origin $PULL_PULL_REF:source_branch
208+
git checkout source_branch
209+
git checkout qa
210+
git config user.email ${GIT_AUTHOR_NAME:-so-integrations}
211+
git config user.name ${GIT_AUTHOR_EMAIL:[email protected]}
212+
echo "Merging source_banch into qa"
213+
git merge --no-commit --no-ff source_branch
214+
if [ $? = 1 ]; then
215+
echo "Please merge code to QA branch first"
216+
exit 1
217+
fi
218+
cd ../../
219+
rm -rf clean_merge_test
220+
fi
221+
image: ghcr.io/jenkins-x/builder-jx:2.1.155-779
222+
name: check-clean-merge-to-qa
199223
- args:
200224
- -c
201225
- 'mkdir -p $HOME; git config --global --add user.name ${GIT_AUTHOR_NAME:-so-integrations}; git config --global --add user.email ${GIT_AUTHOR_EMAIL:[email protected]}; git config --global credential.helper store; git clone $(params.REPO_URL) $(params.subdirectory); echo cloned url: $(params.REPO_URL) to dir: $(params.subdirectory);'

0 commit comments

Comments
 (0)