Skip to content

Commit

Permalink
Merge branch '3.10-dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Apr 1, 2022
2 parents 7eb1132 + 874ba3c commit 1972613
Show file tree
Hide file tree
Showing 4,992 changed files with 75,173 additions and 55,248 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
71 changes: 44 additions & 27 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,31 @@ branches:

## Build matrix for lowest and highest possible targets
environment:
DLLVersion: "5.8.0"
PHPBuild: "x64"
VC: "vc15"
matrix:
- php_ver_target: 5.6
PHPBuild: "x86"
VC: "vc11"
WINCACHE: "1.3.7.12"
- php_ver_target: 7.0
DLLVersion: "5.3.0"
VC: "vc14"
WINCACHE: "2.0.0.8"
- php_ver_target: 7.1
DLLVersion: "5.3.0"
VC: "vc14"
WINCACHE: "2.0.0.8"
- php_ver_target: 7.2
DLLVersion: "5.3.0"
- php_ver_target: 7.3
- php_ver_target: 7.4

init:
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1 # This var relates to caching the php install
- SET PHP=1 # This var relates to caching the php install
- SET ANSICON=121x90 (121x90)
services:
- mssql2014
Expand All @@ -28,15 +44,14 @@ services:
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST C:\tools\php (SET PHP=0)
# TODO: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we
# should go back to latest version in appveyor saving ourselves test time
- ps: choco upgrade chocolatey -y --version 0.10.13 --allow-downgrade --no-progress
- ps: >-
If ($env:php_ver_target -eq "5.6") {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y --forcex86 php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
$VC = "vc11"
$PHPBuild = "x86"
appveyor-retry cinst --no-progress --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y --forcex86 php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
} Else {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
$VC = "vc14"
$PHPBuild = "x64"
appveyor-retry cinst --no-progress --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
}
- appveyor-retry cinst -y sqlite
- cd C:\tools\php
Expand All @@ -53,20 +68,21 @@ install:
copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll
Remove-Item C:\tools\php\* -include .zip
} Else {
$DLLVersion = "4.3.0"
cd c:\tools\php\ext
$source = "http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($env:DLLVersion)/php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
Invoke-WebRequest $source -OutFile $destination
#appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null
$source = "http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
#appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/sqlsrv/$($env:DLLVersion)/php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip
7z x -y php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null
$source = "https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
Invoke-WebRequest $source -OutFile $destination
#appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null
#appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip
7z x -y php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null
Remove-Item c:\tools\php\ext* -include .zip
cd c:\tools\php}}
cd c:\tools\php
}
}
- IF %PHP%==1 copy php.ini-production php.ini /Y
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
Expand Down Expand Up @@ -94,23 +110,24 @@ install:
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
# Get the Wincache DLLs
- ps: >-
If ($env:PHP -eq "1") {
If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"}
If ($env:PHP -eq "1" -and $env:WINCACHE) {
cd c:\tools\php\ext
$source = "http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip"
$destination = "c:\tools\php\ext\php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip"
$source = "https://windows.php.net/downloads/pecl/releases/wincache/$($env:WINCACHE)/php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
$destination = "c:\tools\php\ext\php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
Invoke-WebRequest $source -OutFile $destination
#appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip
7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null
#appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/wincache/$($env:WINCACHE)/php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip
7z x -y php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null
Remove-Item C:\tools\php\ext* -include .zip
cd c:\tools\php}
- IF %PHP%==1 echo extension=php_wincache.dll >> php.ini
- IF %PHP%==1 echo wincache.enablecli = 1 >> php.ini
cd c:\tools\php
Add-Content php.ini "`nextension=php_wincache.dll"
Add-Content php.ini "`wincache.enablecli = 1"
Add-Content php.ini "`n"
}
- IF %PHP%==1 echo zend_extension=php_opcache.dll >> php.ini
- IF %PHP%==1 echo opcache.enable_cli=1 >> php.ini
- IF %PHP%==1 echo extension=php_ldap.dll >> php.ini
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- IF %PHP%==1 appveyor-retry appveyor DownloadFile https://getcomposer.org/download/latest-1.x/composer.phar
- cd C:\projects\joomla-cms
- appveyor-retry composer install --no-progress --profile

Expand Down
184 changes: 184 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
local volumes = [
{
name: "composer-cache",
path: "/tmp/composer-cache",
},
];

local hostvolumes = [
{
name: "composer-cache",
host: {path: "/tmp/composer-cache"}
},
];

local composer(phpversion) = {
name: "composer",
image: "joomlaprojects/docker-images:php" + phpversion,
volumes: volumes,
commands: ["php -v", "composer install"]
};

local prepare(phpversion) = {
name: "prepare",
image: "joomlaprojects/docker-images:php" + phpversion,
environment: {PGPASSWORD: "joomla_ut"},
commands: [
"php -v",
"sleep 20",
"mysql --host=mysql --user=joomla_ut --password=joomla_ut --database=joomla_ut < \"tests/unit/schema/mysql.sql\"",
"psql -h postgres -d joomla_ut -U joomla_ut -a -f \"tests/unit/schema/postgresql.sql\""
]
};

local phpunit(phpversion, ignore_result) = {
name: "PHPUnit",
image: "joomlaprojects/docker-images:php" + phpversion,
[if ignore_result then "failure"]: "ignore",
commands: ["libraries/vendor/bin/phpunit"]
};

local pipeline(phpversion, ignore_result) = {
kind: "pipeline",
name: "PHP " + phpversion,
volumes: hostvolumes,
steps: [
composer(phpversion),
prepare(phpversion),
phpunit(phpversion, ignore_result)
],
services: [
{
name: "mysql",
image: "mysql:5.7",
environment: {
MYSQL_USER: "joomla_ut",
MYSQL_PASSWORD: "joomla_ut",
MYSQL_ROOT_PASSWORD: "joomla_ut",
MYSQL_DATABASE: "joomla_ut"
}
},
{
name: "postgres",
image: "postgres:11-alpine",
ports: [5432],
environment: {
POSTGRES_USER: "joomla_ut",
POSTGRES_PASSWORD: "joomla_ut",
POSTGRES_DB: "joomla_ut"
}
},
{
name: "memcached",
image: "memcached:alpine"
},
{
name:"redis",
image: "redis:alpine"
}
]
};

[
{
kind: "pipeline",
name: "Codequality",
volumes: hostvolumes,
steps: [
{
name: "composer",
image: "joomlaprojects/docker-images:php7.4",
volumes: volumes,
commands: [
"php -v",
"composer install",
"composer require phpmd/phpmd"
]
},
{
name: "phpcs",
image: "joomlaprojects/docker-images:php7.2",
commands: [
"php -v",
"libraries/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla ."
]
},
{
name: "javascript",
image: "joomlaprojects/docker-images:systemtests",
commands: [
"echo $(date)",
"export DISPLAY=:0",
"Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &",
"sleep 3",
"fluxbox > /dev/null 2>&1 &",
"cd tests/javascript",
"npm install",
"cd ../..",
"tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run",
"echo $(date)"
]
}
]
},
pipeline("5.3", false),
pipeline("5.4", false),
pipeline("5.5", false),
pipeline("5.6", false),
pipeline("7.0", false),
pipeline("7.1", false),
pipeline("7.2", false),
pipeline("7.3", false),
pipeline("7.4", false),
pipeline("8.0", true),
{
kind: "pipeline",
name: "package",
steps: [
{
name: "packager",
image: "joomlaprojects/docker-images:packager",
environment: {
FTP_USERNAME: {from_secret: "ftpusername"},
FTP_PASSWORD: {from_secret: "ftppassword"},
FTP_HOSTNAME: "ci.joomla.org",
FTP_PORT: "21",
FTP_DEST_DIR: "/artifacts",
FTP_VERIFY: "false",
FTP_SECURE: "true",
HTTP_ROOT: "https://ci.joomla.org/artifacts",
DRONE_PULL_REQUEST: "DRONE_PULL_REQUEST",
DRONE_COMMIT: "DRONE_COMMIT",
GITHUB_TOKEN: {from_secret: "github_token"}
},
commands: [
"if [ $DRONE_REPO_NAME != 'joomla-cms' ]; then echo \"The packager only runs on the joomla/joomla-cms repo\"; exit 0; fi",
"/bin/drone_build.sh"
]
}
]
},
{
kind: "pipeline",
name: "Rips",
steps: [
{
name: "analysis3x",
image: "rips/rips-cli:3.2.2",
when: {
repo: ["joomla/joomla-cms", "joomla/cms-security"],
branch: ["3.10-dev"]
},
commands: [
"export RIPS_BASE_URI='https://api.rips.joomla.org'",
"rips-cli rips:list --table=scans --parameter filter='{\"__and\":[{\"__lessThan\":{\"percent\":100}}]}'",
"rips-cli rips:scan:start --progress --application=1 --threshold=0 --path=$(pwd) --remove-code --remove-upload --tag=$DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo \"Please contact the security team at security@joomla.org\"; exit 1; }"
],
environment: {
RIPS_EMAIL: {from_secret:"RIPS_EMAIL"},
RIPS_PASSWORD: {from_secret: "RIPS_PASSWORD"}
}
}
]
}
]

0 comments on commit 1972613

Please sign in to comment.