Skip to content
Snippets Groups Projects

#3503613 Check if project already contains _WEB_ROOT directory

@@ -195,8 +195,8 @@
[[ $_TARGET_DB_TYPE == "mariadb" ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE
.setup-webserver: &setup-webserver
- mkdir -p $BROWSERTEST_OUTPUT_DIRECTORY
- mkdir -p $CI_PROJECT_DIR/$_WEB_ROOT/sites/default/files/simpletest
- mkdir -pv $BROWSERTEST_OUTPUT_DIRECTORY
- mkdir -pv $CI_PROJECT_DIR/$_WEB_ROOT/sites/default/files/simpletest
- chmod -R 755 $BROWSERTEST_OUTPUT_DIRECTORY
- chmod -R 755 $CI_PROJECT_DIR/$_WEB_ROOT/sites/default/files/simpletest
- ln -s $CI_PROJECT_DIR/$_WEB_ROOT /var/www/html
@@ -461,6 +461,12 @@ stages:
- *show-ci-variables
- *show-environment-variables
- *add-composer-drupal-lenient
# Check if the project already has an existing directory which will clash with $_WEB_ROOT. If it does, fail the job.
- test -d "$_WEB_ROOT" && echo -e "$DIVIDER\nThis project contains a top-level directory named '$_WEB_ROOT'
which is the same as the variable _WEB_ROOT. This variable defines the location for installing Drupal core
and the clash may cause some jobs to fail or give misleading results.\n \nTo resolve this, you can either
rename the directory within your project or set a different custom value for the _WEB_ROOT variable. The
name can be anything other than an existing directory in your project.$DIVIDER" && exit 1;
# Save the initial list of top-level files and folders. This will be just the project's own, nothing more.
# Use -A to include the hidden files but not . and ..
- export PROJECT_FILES=$(ls -A)
Loading