File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,30 @@ spec:
196
196
fi
197
197
image: ghcr.io/jenkins-x/builder-jx:2.1.155-779
198
198
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
199
223
- args :
200
224
- -c
201
225
-
' 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);'
You can’t perform that action at this time.
0 commit comments