Commit 9f2e8cf6 authored by Stefan Busemann's avatar Stefan Busemann

Merge branch 'task/new-server' into 'develop'

Change to new stage server

See merge request !385
parents 61cd63de 98171958
Pipeline #6090 passed with stages
in 4 minutes and 38 seconds
APIVersion: v1.3.0
APIVersion: v1.5.2
name: ter
type: typo3
docroot: html
php_version: "7.0"
docroot: public
php_version: "7.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.1"
webcache_enabled: false
provider: default
hooks:
post-start:
- exec: sudo apt-get update
- exec: sudo apt-get install php7.0-ldap -y
- exec: cp ../private/typo3conf/AdditionalConfiguration.ddev.php ../private/typo3conf/AdditionalConfiguration.php
- exec: composer install -d /var/www/html
- exec: npm --prefix ../private/typo3conf/ext/t3olayout/Build install
- exec: npm --prefix ../private/typo3conf/ext/t3olayout/Build run-script build
- exec: ../vendor/bin/typo3cms install:generatepackagestates
- exec: ../vendor/bin/typo3cms install:extensionsetupifpossible
# This config.yaml was created with ddev version v1.3.0
# webimage: drud/ddev-webserver:v1.3.0
dbimage: drud/ddev-dbserver:v1.2.0
# dbaimage: drud/phpmyadmin:v1.3.0
- exec: sudo apt-get install php7.2-ldap -y
- exec: cp private/typo3conf/AdditionalConfiguration.ddev.php private/typo3conf/AdditionalConfiguration.php
- exec: composer install
- exec: npm --prefix private/typo3conf/ext/t3olayout/Build install
- exec: npm --prefix private/typo3conf/ext/t3olayout/Build run-script build
- exec: vendor/bin/typo3cms install:generatepackagestates
- exec: vendor/bin/typo3cms install:extensionsetupifpossible
# This config.yaml was created with ddev version v1.5.2
# webimage: drud/ddev-webserver:v1.5.2
# dbimage: drud/ddev-dbserver:v1.5.2-10.2
# dbaimage: drud/phpmyadmin:v1.5.2
# bgsyncimage: drud/ddev-bgsync:v1.5.2
# However we do not recommend explicitly wiring these images into the
# config.yaml as they may break future versions of ddev.
# You can update this config.yaml using 'ddev config'.
......@@ -39,7 +42,7 @@ dbimage: drud/ddev-dbserver:v1.2.0
# docroot: <relative_path> # Relative path to the directory containing index.php.
# php_version: "7.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2"
# php_version: "7.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3"
# You can explicitly specify the webimage, dbimage, dbaimage lines but this
# is not recommended, as the images are often closely tied to ddev's' behavior,
......@@ -48,6 +51,7 @@ dbimage: drud/ddev-dbserver:v1.2.0
# webimage: <docker_image> # nginx/php docker image.
# dbimage: <docker_image> # mariadb docker image.
# dbaimage: <docker_image>
# bgsyncimage: <docker_image>
# router_http_port: <port> # Port to be used for http (defaults to port 80)
# router_https_port: <port> # Port for https (defaults to 443)
......@@ -71,13 +75,27 @@ dbimage: drud/ddev-dbserver:v1.2.0
# upload_dir: custom/upload/dir
# would set the destination path for ddev import-files to custom/upload/dir.
# working_dir:
# web: /var/www/html
# db: /home
# would set the default working directory for the web and db services.
# These values specify the destination directory for ddev ssh and the
# directory in which commands passed into ddev exec are run.
# omit_containers: ["dba", "ddev-ssh-agent"]
# would omit the dba (phpMyAdmin) and ddev-ssh-agent containers. Currently
# only those two containers can be omitted here.
# Note that these containers can also be omitted globally in the
# ~/.ddev/global_config.yaml or with the "ddev config global" command.
# provider: default # Currently either "default" or "pantheon"
#
# Many ddev commands can be extended to run tasks after the ddev command is
# executed.
# See https://ddev.readthedocs.io/en/latest/users/extending-commands/ for more
# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
#hooks:
# post-start:
# - exec: composer install -d /var/www/html
# - exec: composer install -d /var/www/html
\ No newline at end of file
# Created by .ignore support plugin (hsz.mobi)
.idea
vendor
html
private/fileadmin
private/typo3
private/index.php
private/typo3temp
private/uploads
private/typo3conf/ext/
private/typo3conf/PackageStates.php
private/typo3conf/AdditionalConfiguration.php
private/typo3conf/*.log
private/typo3conf/l10n/
/vendor
/private
!/private/typo3conf/LocalConfiguration.php
!/private/typo3conf/AdditionalConfiguration.ddev.php
!/private/typo3conf/RealurlConfiguration.php
/public/
/auth.json
/assets/
sequelpro.spf
.ddev/db_snapshots/
.idea/
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE"
paths:
- /composer
include:
- project: 't3o/t3olayout'
ref: master
file: '/Configuration/GitLab/t3o-builds.yml'
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
before_script:
- apk add bash --no-cache
stages:
- dump
- test
- build
- layout
- deploy
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
STAGE_PORT: 22200
STAGE_HOST: "extensions-stage-v9.typo3.org"
PRODUCTION_PORT: 22193
PRODUCTION_HOST: "typo3.org"
DUMP_USER: "tthreeorgstage"
DUMP_EXCLUDE_TABLES_LIST: "be_groups,be_sessions,be_users,cf_cache_hash,cf_cache_hash_tags,cf_cache_imagesizes,cf_cache_imagesizes_tags,cf_cache_news_category,cf_cache_news_category_tags,cf_cache_pages,cf_cache_pages_tags,cf_cache_pagesection,cf_cache_pagesection_tags,cf_cache_rootline,cf_cache_rootline_tags,cf_extbase_datamapfactory_datamap,cf_extbase_datamapfactory_datamap_tags,cf_extbase_object,cf_extbase_object_tags,cf_extbase_reflection,cf_extbase_reflection_tags,cf_tx_solr,cf_tx_solr_configuration,cf_tx_solr_configuration_tags,cf_tx_solr_tags,fe_groups,fe_sessions,fe_users,sys_domain,sys_log,tx_solr_cache,tx_solr_cache_tags"
PHP_EXECUTABLE: "/opt/php/php72/bin/php"
test:unit:
stage: test
image: php:7.0-alpine
image: composer:1
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
before_script:
- apk add git --update
- export TYPO3_PATH_WEB="$PWD/html"
- export COMPOSER_CACHE_DIR=.cache/composer
- curl https://getcomposer.org/composer.phar -o composer.phar --silent
- chmod +x composer.phar
- ./composer.phar install
- mkdir $TYPO3_PATH_WEB/fileadmin/ && touch $TYPO3_PATH_WEB/fileadmin/currentcoredata.json
- apk add git --update
- export TYPO3_PATH_WEB="$PWD/private"
- export COMPOSER_CACHE_DIR=.cache/composer
- mkdir $TYPO3_PATH_WEB/fileadmin/ && touch $TYPO3_PATH_WEB/fileadmin/currentcoredata.json
script:
- ./composer.phar test:unit
- composer install
- composer test:unit
test:php:
stage: test
image: ekreative/php-cs-fixer:2
variables:
GIT_STRATEGY: "clone"
script:
- php-cs-fixer fix --dry-run --config=.gitlab-ci/build/.php_cs --diff
except:
- assets
build:
stage: build
image: php:7.0-alpine
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
before_script:
- apk add bash --no-cache
- apk add git --update
- curl https://getcomposer.org/composer.phar -o composer.phar --silent
- chmod +x composer.phar
script:
- ./composer.phar config store-auths false
- ./composer.phar config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
- ./composer.phar install --no-interaction --no-progress --no-dev
- rm composer.phar
artifacts:
paths:
- ./
expire_in: '1h'
except:
- assets
layout:
stage: layout
image: node:latest
before_script:
- cd private/typo3conf/ext/t3olayout/Build
script:
- npm install
- npm run build
artifacts:
paths:
- ./
expire_in: '7d'
dependencies:
- build
except:
- assets
.deploy-template: &deploy_template
stage: deploy
image:
name: "torvitas/deployer:4.0.0-alpine"
entrypoint: [""]
before_script:
- mkdir -p /root/.ssh/
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_STAGE" | ssh-add -
- echo "$SSH_PRIVATE_KEY_PRODUCTION" | ssh-add -
- ssh-keyscan -p 22191 extensions-stage.typo3.org >> /root/.ssh/known_hosts
- ssh-keyscan -p 22192 extensions.typo3.org >> /root/.ssh/known_hosts
script:
- dep -f./.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
dependencies:
- layout
except:
- assets
deploy-master:
<<: *deploy_template
environment:
name: master
url: https://extensions.typo3.org/
only:
- master
stage: deploy
image: composer:1
before_script:
- apk add rsync --update
- mkdir -p /root/.ssh/
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_STAGE" | ssh-add -
- echo "$SSH_PRIVATE_KEY_PRODUCTION" | ssh-add -
- ssh-keyscan -p ${STAGE_PORT} ${STAGE_HOST} >> /root/.ssh/known_hosts
- ssh-keyscan -p ${PRODUCTION_PORT} ${PRODUCTION_HOST} >> /root/.ssh/known_hosts
- composer config cache-dir /cache/composer
- composer global require deployer/deployer
- composer global require deployer/recipes
script:
- /tmp/vendor/bin/dep --file=./.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
dependencies:
- layout
except:
- assets
deploy-develop:
<<: *deploy_template
environment:
name: develop
url: https://extensions-stage.typo3.org/
url: https://extensions-stage-v9.typo3.org/
only:
- develop
dump-assets:
<<: *deploy_template
stage: dump
image: alpine:3.5
artifacts:
paths:
- ./assets/
expire_in: '3d'
script:
- apk add rsync --no-cache
- rsync -ah -e "ssh -p 22191" extensionsstage@extensions-stage.typo3.org:ci/shared/ ./assets/
- ssh -p22191 extensionsstage@extensions-stage.typo3.org "mysqldump -u${DEV_DATABASE_USER} -p${DEV_DATABASE_PASSWORD} -h127.0.0.1 extensionsstage | gzip -9 -c" > ./assets/db.sql.gz
dependencies:
when:
only:
- assets
except:
- task/new-server
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="../../vendor/nimut/testing-framework/src/TestingFramework/Bootstrap/UnitTestsBootstrap.php"
bootstrap="../../vendor/nimut/testing-framework/res/Configuration/UnitTestsBootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
......@@ -15,7 +15,7 @@
>
<testsuites>
<testsuite name="ter_fe2 tests">
<directory>../../html/typo3conf/ext/ter_fe2/Tests/Unit</directory>
<directory>../../extensions/ter_fe2/Tests/Unit</directory>
</testsuite>
</testsuites>
</phpunit>
......@@ -2,13 +2,13 @@
namespace Deployer;
require_once '/composer/vendor/deployer/deployer/recipe/common.php';
require_once '/composer/vendor/deployer/recipes/rsync.php';
require_once '/tmp/vendor/deployer/deployer/recipe/common.php';
require_once '/tmp/vendor/deployer/recipes/recipe/rsync.php';
$sharedDirectories = [
'html/fileadmin',
'html/uploads',
'html/.well-known'
'private/fileadmin',
'private/uploads',
'public/.well-known'
];
set('shared_dirs', $sharedDirectories);
......@@ -19,9 +19,7 @@ $sharedFiles = [
set('shared_files', $sharedFiles);
$writeableDirectories = [
'html/typo3temp',
'html/fileadmin',
'html/uploads'
'public/typo3temp'
];
set('writable_dirs', $writeableDirectories);
......@@ -52,18 +50,18 @@ set('rsync', [
]);
set('rsync_src', './');
set('keep_releases', 10);
serverList('./.gitlab-ci/deployer/servers.yml');
set('php', '/opt/php/php70/bin/php');
set('typo3_console', 'vendor/bin/typo3cms');
inventory('./.gitlab-ci/deployer/servers.yml');
set('php', '/opt/php/php72/bin/php');
set('bin_folder', 'vendor/bin/');
task('typo3', function() {
run('cd {{release_path}} && {{php}} /usr/local/bin/composer install');
run('cd {{release_path}} && {{php}} {{typo3_console}} install:generatepackagestates');
run('cd {{release_path}} && {{php}} {{typo3_console}} install:extensionsetupifpossible');
run('cd {{release_path}} && {{php}} {{bin_folder}}typo3cms install:generatepackagestates');
run('cd {{release_path}} && {{php}} {{bin_folder}}typo3cms install:extensionsetupifpossible');
});
task('cache', function () {
run('cd {{release_path}} && {{php}} vendor/bin/cachetool opcache:reset');
run('cd {{release_path}} && {{php}} {{bin_folder}}cachetool opcache:reset');
});
......
master:
stage: production
host: extensions.typo3.org
hostname: extensions.typo3.org
port: 22192
user: extensions
forward_agent: true
deploy_path: ~/ci/
develop:
stage: stage
host: extensions-stage.typo3.org
port: 22191
hostname: extensions-stage-v9.typo3.org
port: 22200
user: extensionsstage
forward_agent: true
deploy_path: ~/ci/
task/new-server:
stage: stage
hostname: extensions-stage-v9.typo3.org
port: 22200
user: extensionsstage
writable_mode: chmod
forward_agent: true
deploy_path: ~/ci/
......@@ -40,17 +40,17 @@
"helhum/typo3-secure-web": "^0.2.7"
},
"require-dev": {
"nimut/testing-framework": "^2.0"
"nimut/testing-framework": "^3.0"
},
"config": {
"store-auths": false,
"platform": {
"php": "7.0.30"
"php": "7.2.13"
}
},
"extra": {
"typo3/cms": {
"web-dir": "html",
"web-dir": "public",
"root-dir": "private"
}
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -314,7 +314,8 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
if ($versionCount === 1) {
$this->lastVersion = null;
} else {
$this->lastVersion = array_shift($this->getReverseVersionsByVersionNumber());
$reverseVersionsByVersionNumber = $this->getReverseVersionsByVersionNumber();
$this->lastVersion = array_shift($reverseVersionsByVersionNumber);
}
}
}
......
......@@ -50,7 +50,7 @@ class ArchiveUtilityTest extends \Nimut\TestingFramework\TestCase\UnitTestCase
$testCases = [];
$pathToFixtures = __DIR__ . '/../Fixtures/EmConfFiles/';
$files = scandir($pathToFixtures);
$files = scandir($pathToFixtures, SCANDIR_SORT_ASCENDING);
foreach ($files as $file) {
if ($file === '.' || $file === '..') {
continue;
......@@ -63,7 +63,7 @@ class ArchiveUtilityTest extends \Nimut\TestingFramework\TestCase\UnitTestCase
$emConf = reset($EM_CONF);
$testCases['ext_emconf.php of extension ' . substr($file, 0, -4)] = [
$code,
$emConf,
$emConf
];
}
......
<?php
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
$GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel'] = 'normal';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] = 'yourdbname';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] = 'yourdbuser';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] = 'yourdbpassword';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] = 'yourdbhost'; /* for example 127.0.0.1 */
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] = 'yourdbport'; /* default is 3306 */
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$P$CZqeoYBTHC0kXKny4tpTvBSzzV5wVY0'; /* joh316 */
......@@ -27,6 +27,7 @@ return [
'ig_ldap_sso_auth' => 'a:18:{s:18:"checkConfiguration";s:1:"0";s:21:"throwExceptionAtLogin";s:1:"1";s:22:"forceLowerCaseUsername";s:1:"1";s:26:"enableBELDAPAuthentication";s:1:"0";s:17:"TYPO3BEGroupExist";s:1:"0";s:16:"TYPO3BEUserExist";s:1:"0";s:10:"BEfailsafe";s:1:"0";s:27:"TYPO3BEGroupsNotSynchronize";s:1:"0";s:12:"keepBEGroups";s:1:"0";s:11:"enableBESSO";s:1:"0";s:26:"enableFELDAPAuthentication";s:1:"1";s:31:"TYPO3FEDeleteUserIfNoLDAPGroups";s:1:"0";s:32:"TYPO3FEDeleteUserIfNoTYPO3Groups";s:1:"0";s:17:"TYPO3FEGroupExist";s:1:"0";s:16:"TYPO3FEUserExist";s:1:"0";s:27:"TYPO3FEGroupsNotSynchronize";s:1:"1";s:12:"keepFEGroups";s:1:"1";s:11:"enableFESSO";s:1:"0";}',
'realurl' => 'a:6:{s:10:"configFile";s:34:"typo3conf/RealurlConfiguration.php";s:14:"enableAutoConf";s:1:"1";s:14:"autoConfFormat";s:1:"0";s:17:"segTitleFieldList";s:0:"";s:12:"enableDevLog";s:1:"0";s:10:"moduleIcon";s:1:"0";}',
'rsaauth' => 'a:1:{s:18:"temporaryDirectory";s:0:"";}',
'rte_ckeditor' => 'a:1:{s:15:"ckeditorVersion";s:1:"1";}',
'saltedpasswords' => 'a:2:{s:3:"BE.";a:4:{s:21:"saltedPWHashingMethod";s:41:"TYPO3\\CMS\\Saltedpasswords\\Salt\\PhpassSalt";s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}s:3:"FE.";a:5:{s:7:"enabled";i:1;s:21:"saltedPWHashingMethod";s:41:"TYPO3\\CMS\\Saltedpasswords\\Salt\\PhpassSalt";s:11:"forceSalted";i:0;s:15:"onlyAuthService";i:0;s:12:"updatePasswd";i:1;}}',
'scheduler' => 'a:4:{s:11:"maxLifetime";s:4:"1440";s:11:"enableBELog";s:1:"1";s:15:"showSampleTasks";s:1:"1";s:11:"useAtdaemon";s:1:"0";}',
'solr' => 'a:0:{}',
......
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