diff --git a/ci/gitlab-ci/lib.yml b/ci/gitlab-ci/lib.yml index 689e5b3d92..c26fb81b3e 100644 --- a/ci/gitlab-ci/lib.yml +++ b/ci/gitlab-ci/lib.yml @@ -810,13 +810,20 @@ git submodule init git submodule update + # Install source customapp, if pipeline runs for a customapp if [ "${CI_IS_CUSTOMAPP}" == "true" ]; then + # COMPOSER custom cache + # CI_CUSTOM_CACHE_DIR is a volume shared betwean runners + export COMPOSER_CACHE_DIR=${CI_CUSTOM_CACHE_DIR}/${CI_PROJECT_NAMESPACE}/composer-cache/v1/ + mkdir -p ${COMPOSER_CACHE_DIR} + log "instaling custom app ..." customappname=$(cat ${CI_PROJECT_DIR}/composer.json | jq -r '.name') pushd ${TINE20ROOT}/tine20 + composer config "repositories.ci" git "${CI_REPOSITORY_URL}"; - composer require "$name dev-master#${CI_COMMIT_SHA}"; + composer require "$customappname dev-master#${CI_COMMIT_SHA}"; popd fi diff --git a/ci/gitlab-ci/lib/scripts/test.sh b/ci/gitlab-ci/lib/scripts/test.sh index 3a97cdf544..4095183273 100644 --- a/ci/gitlab-ci/lib/scripts/test.sh +++ b/ci/gitlab-ci/lib/scripts/test.sh @@ -27,13 +27,20 @@ test_prepare_working_dir() { git submodule init git submodule update + # Install source customapp, if pipeline runs for a customapp if [ "${CI_IS_CUSTOMAPP}" == "true" ]; then + # COMPOSER custom cache + # CI_CUSTOM_CACHE_DIR is a volume shared betwean runners + export COMPOSER_CACHE_DIR=${CI_CUSTOM_CACHE_DIR}/${CI_PROJECT_NAMESPACE}/composer-cache/v1/ + mkdir -p ${COMPOSER_CACHE_DIR} + log "instaling custom app ..." customappname=$(cat ${CI_PROJECT_DIR}/composer.json | jq -r '.name') pushd ${TINE20ROOT}/tine20 + composer config "repositories.ci" git "${CI_REPOSITORY_URL}"; - composer require "$name dev-master#${CI_COMMIT_SHA}"; + composer require "$customappname dev-master#${CI_COMMIT_SHA}"; popd fi