# enforce project dir
cd ${CI_PROJECT_DIR};
# install ssh
apt-get update -qq;
apt-get install -qq git;
# Setup SSH deploy keys
which ssh-agent || ( apt-get install -qq openssh-client );
eval $(ssh-agent -s);
echo "${CI_TEST_PRIVATE_KEY}" | ssh-add - ;
# mkdir -p ~/.ssh;
ssh ${CI_TEST_SSH} -o StrictHostKeyChecking=no "cd "${CI_TEST_FOLDER}";
    git config user.name "${GITLAB_USER_LOGIN}";
    git config user.email "${GITLAB_USER_EMAIL}";
    git remote set-url origin "https://${GITLAB_USER_LOGIN}:${CI_PAT}@gitlab.com/inoby/${CI_PROJECT_NAME}.git";
    git fetch; 
    git checkout release; 
    git reset --hard; 
    git pull;
    test -f composer.json && composer install
    cd ../${PARENT_THEME}
    git config user.name "${GITLAB_USER_LOGIN}";
    git config user.email "${GITLAB_USER_EMAIL}";
    git remote set-url origin "${PARENT_THEME_URL}";
    git fetch;
    git reset --hard; 
    git pull;
    git checkout ${CI_PARENT_THEME_VERSION}
    exit;";