Commit c1cd12ac authored by Raphael Defosseux's avatar Raphael Defosseux

fixing merge request process

Signed-off-by: Raphael Defosseux's avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 9226e19e
...@@ -26,8 +26,8 @@ pipeline { ...@@ -26,8 +26,8 @@ pipeline {
echo "GitLab tar branch is ${env.gitlabTargetBranch}" echo "GitLab tar branch is ${env.gitlabTargetBranch}"
// GitLab-Jenkins pugin integration is lacking to perform the merge by itself // GitLab-Jenkins pugin integration is lacking to perform the merge by itself
// Doing it manually --> it may have merge conflicts // Doing it manually --> it may have merge conflicts
sh "./scripts/doGitLabMerge.sh ${GIT_COMMIT} ${env.gitlabTargetBranch}" sh "./scripts/doGitLabMerge.sh ${env.gitlabSourceBranch} ${env.gitlabTargetBranch} ${GIT_COMMIT}"
sh "./scripts/checkCodingFormattingRules.sh ${GIT_COMMIT} ${env.gitlabTargetBranch}" sh "./scripts/checkCodingFormattingRules.sh ${env.gitlabSourceBranch} ${env.gitlabTargetBranch}"
} else { } else {
sh "./scripts/checkCodingFormattingRules.sh" sh "./scripts/checkCodingFormattingRules.sh"
} }
......
#!/bin/bash #!/bin/bash
INIT_COMMIT=$1 SOURCE_BRANCH=$1
echo "Initial Commit is : $INIT_COMMIT" echo "Source Branch is : $SOURCE_BRANCH"
TARGET_BRANCH=$2 TARGET_BRANCH=$2
echo "Target Branch is : $TARGET_BRANCH" echo "Target Branch is : $TARGET_BRANCH"
TARGET_COMMIT_ID=$3
echo "Target CommID is : $TARGET_COMMIT_ID"
git checkout origin/$TARGET_BRANCH
git config user.email "jenkins@openairinterface.org" git config user.email "jenkins@openairinterface.org"
git config user.name "OAI Jenkins" git config user.name "OAI Jenkins"
git merge --ff $INIT_COMMIT -m "Temporary merge for CI" SOURCE_INIT_COMMIT=`cat .git/refs/remotes/origin/$SOURCE_BRANCH`
git checkout -f $SOURCE_INIT_COMMIT
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment