# Pastebin zjejeAX9 ########## Merge Part ############## if [[ "$JOB_NAME" =~ "merge" ]] && [[ "$DRY_RUN" = false ]]; then echo "--> INFO: Running merge" gerrit_ssh=$(echo "$GERRIT_URL" | awk -F"/" '{print $3}') git remote set-url origin ssh://"$RELEASE_USERNAME"@"$gerrit_ssh":29418/"$PROJECT" git config user.name "$RELEASE_USERNAME" git config user.email "$RELEASE_EMAIL" echo -e "Host $gerrit_ssh\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config chmod 600 ~/.ssh/config git push origin "$VERSION" fi fi