2019-05-04 16:22:56 +00:00
---
2019-05-05 10:29:49 +00:00
kind : pipeline
name : default
2019-04-28 12:41:10 +00:00
clone :
2017-02-12 13:32:55 +00:00
2019-05-05 10:29:49 +00:00
steps :
2022-09-15 14:06:40 +00:00
- name : setup
image : joomlaprojects/docker-images:php7.4
volumes :
- name : certificates
path : /certificates
commands :
- cp -v tests/Codeception/_data/certs/* /certificates/
2019-06-01 15:27:08 +00:00
- name : composer
2022-04-08 12:53:17 +00:00
image : joomlaprojects/docker-images:php7.4
2020-08-31 14:35:42 +00:00
volumes :
- name : composer-cache
path : /tmp/composer-cache
2017-02-12 10:40:56 +00:00
commands :
2019-07-15 21:11:29 +00:00
- composer validate --no-check-all --strict
2018-04-02 17:17:42 +00:00
- composer install --no-progress --no-suggest
2019-06-01 15:27:08 +00:00
- name : phpcs
2019-07-11 19:21:48 +00:00
image : joomlaprojects/docker-images:php7.2
2019-07-11 21:42:30 +00:00
depends_on : [ composer ]
2019-07-11 19:21:48 +00:00
commands :
- echo $(date)
2023-01-31 10:20:05 +00:00
- ./libraries/vendor/bin/php-cs-fixer fix -vvv --dry-run
2022-06-27 18:22:40 +00:00
- ./libraries/vendor/bin/phpcs --extensions=php -p --standard=ruleset.xml .
2019-06-01 15:27:08 +00:00
- echo $(date)
2022-10-21 10:19:30 +00:00
- name : phan
image : joomlaprojects/docker-images:php7.4-ast
depends_on : [ phpcs ]
failure : ignore
commands :
- ./libraries/vendor/bin/phan
2019-06-01 15:27:08 +00:00
- name : npm
2022-10-21 08:46:20 +00:00
image : node:16-bullseye-slim
2019-06-01 15:27:08 +00:00
depends_on : [ phpcs ]
2022-08-24 19:30:50 +00:00
volumes :
- name : npm-cache
path : /tmp/npm-cache
environment :
npm_config_cache : /tmp/npm-cache
2019-06-01 15:27:08 +00:00
commands :
2019-07-15 21:11:29 +00:00
- npm ci --unsafe-perm
2018-03-31 14:19:44 +00:00
2019-05-08 19:49:59 +00:00
- name : php72-unit
2019-06-01 15:27:08 +00:00
depends_on : [ phpcs ]
2019-08-19 21:12:45 +00:00
image : joomlaprojects/docker-images:php7.2
2018-03-31 14:19:44 +00:00
commands :
2019-05-08 19:49:59 +00:00
- php -v
2019-07-11 22:48:37 +00:00
- ./libraries/vendor/bin/phpunit --testsuite Unit
2018-03-31 14:19:44 +00:00
2019-05-08 19:49:59 +00:00
- name : php73-unit
2019-06-01 15:27:08 +00:00
depends_on : [ phpcs ]
2019-08-19 21:12:45 +00:00
image : joomlaprojects/docker-images:php7.3
2018-03-31 14:19:44 +00:00
commands :
2019-05-08 19:49:59 +00:00
- php -v
2019-07-11 22:48:37 +00:00
- ./libraries/vendor/bin/phpunit --testsuite Unit
2018-03-31 14:19:44 +00:00
2019-05-08 19:49:59 +00:00
- name : php74-unit
2019-06-01 15:27:08 +00:00
depends_on : [ phpcs ]
2019-08-19 21:12:45 +00:00
image : joomlaprojects/docker-images:php7.4
2019-05-08 19:49:59 +00:00
commands :
- php -v
2019-07-11 22:48:37 +00:00
- ./libraries/vendor/bin/phpunit --testsuite Unit
2019-05-08 19:49:59 +00:00
- name : php80-unit
2019-06-01 15:27:08 +00:00
depends_on : [ phpcs ]
2019-08-19 21:12:45 +00:00
image : joomlaprojects/docker-images:php8.0
2018-03-31 14:19:44 +00:00
commands :
2019-05-08 19:49:59 +00:00
- php -v
2019-07-11 22:48:37 +00:00
- ./libraries/vendor/bin/phpunit --testsuite Unit
2021-12-08 08:44:00 +00:00
- name : php81-unit
depends_on : [ phpcs ]
image : joomlaprojects/docker-images:php8.1
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
2019-07-11 22:48:37 +00:00
- name : php72-integration
depends_on : [ npm ]
image : joomlaprojects/docker-images:php7.2
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name : php73-integration
depends_on : [ npm ]
image : joomlaprojects/docker-images:php7.3
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name : php74-integration
depends_on : [ npm ]
image : joomlaprojects/docker-images:php7.4
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
- name : php80-integration
depends_on : [ npm ]
image : joomlaprojects/docker-images:php8.0
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
2021-12-08 08:44:00 +00:00
- name : php81-integration
depends_on : [ npm ]
image : joomlaprojects/docker-images:php8.1
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
2021-12-28 14:13:29 +00:00
- name : php82-integration
depends_on : [ npm ]
image : joomlaprojects/docker-images:php8.2
2021-12-08 08:44:00 +00:00
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration
2019-07-11 22:48:37 +00:00
- name : php72-integration-pgsql
depends_on : [ npm ]
image : joomlaprojects/docker-images:php7.2
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
2019-10-12 17:47:22 +00:00
- name : php73-integration-pgsql
depends_on : [ npm ]
image : joomlaprojects/docker-images:php7.3
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
- name : php74-integration-pgsql
depends_on : [ npm ]
image : joomlaprojects/docker-images:php7.4
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
- name : php80-integration-pgsql
depends_on : [ npm ]
image : joomlaprojects/docker-images:php8.0
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
2018-03-31 14:19:44 +00:00
2021-12-08 08:44:00 +00:00
- name : php81-integration-pgsql
depends_on : [ npm ]
image : joomlaprojects/docker-images:php8.1
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
2021-12-28 14:13:29 +00:00
- name : php82-integration-pgsql
depends_on : [ npm ]
image : joomlaprojects/docker-images:php8.2
2021-12-08 08:44:00 +00:00
commands :
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
2020-07-26 23:12:29 +00:00
- name : scss-cs
depends_on : [ npm ]
image : node:current-alpine
commands :
2020-10-19 09:16:13 +00:00
- npm run lint:css
2020-07-26 23:12:29 +00:00
2019-05-05 10:29:49 +00:00
- name : javascript-cs
2019-06-01 15:27:08 +00:00
depends_on : [ npm ]
2020-07-26 23:03:33 +00:00
image : node:current-alpine
2018-12-29 10:46:22 +00:00
commands :
2020-10-19 09:16:13 +00:00
- npm run lint:js
2018-04-01 13:31:04 +00:00
2022-10-22 11:59:27 +00:00
- name : prepare_system_tests
2022-05-23 09:40:26 +00:00
depends_on :
- npm
image : joomlaprojects/docker-images:systemtests
2022-10-22 11:59:27 +00:00
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2022-05-23 09:40:26 +00:00
commands :
2022-10-22 11:59:27 +00:00
- sed -i 's/tests\\/Codeception\\/_output/\\/drone\\/src\\/tests\\/cypress\\/output/' codeception.yml
2022-05-23 09:40:26 +00:00
- php libraries/vendor/bin/codecept build
2022-10-22 11:59:27 +00:00
- npx cypress install
- npx cypress verify
2022-05-23 09:40:26 +00:00
2021-12-22 18:29:22 +00:00
- name : phpmin-api-mysql
depends_on :
2022-10-22 11:59:27 +00:00
- prepare_system_tests
2019-10-13 11:19:47 +00:00
image : joomlaprojects/docker-images:systemtests
2020-01-01 10:44:50 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
2019-05-20 07:14:27 +00:00
commands :
2022-10-21 14:26:07 +00:00
- bash tests/Codeception/drone-api-run.sh "$(pwd)" mysql mysqli mysql jos_
2019-05-20 07:14:27 +00:00
2022-10-22 11:59:27 +00:00
- name : phpmin-api-postgres
2021-12-22 18:29:22 +00:00
depends_on :
2022-10-22 11:59:27 +00:00
- prepare_system_tests
image : joomlaprojects/docker-images:systemtests
2021-12-22 18:29:22 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
commands :
2022-10-22 11:59:27 +00:00
- bash tests/Codeception/drone-api-run.sh "$(pwd)" postgres pgsql postgres jos_
2021-12-28 14:13:29 +00:00
2022-10-22 11:59:27 +00:00
- name : phpmax-api-mysql
2021-12-22 18:29:22 +00:00
depends_on :
2022-10-21 15:52:39 +00:00
- phpmin-api-mysql
2022-10-22 11:59:27 +00:00
- phpmin-api-postgres
image : joomlaprojects/docker-images:systemtests8.1
2020-01-01 10:44:50 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
2019-07-24 20:54:26 +00:00
commands :
2022-10-22 11:59:27 +00:00
- bash tests/Codeception/drone-api-run.sh "$(pwd)" mysqlphpmax mysqli mysql phpmax_
2019-07-24 20:54:26 +00:00
2022-05-23 17:14:18 +00:00
- name : phpmax-api-postgres
depends_on :
2022-10-21 15:52:39 +00:00
- phpmin-api-mysql
2022-10-22 11:59:27 +00:00
- phpmin-api-postgres
2022-05-23 17:14:18 +00:00
image : joomlaprojects/docker-images:systemtests8.1
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
commands :
2022-10-21 14:26:07 +00:00
- bash tests/Codeception/drone-api-run.sh "$(pwd)" postgresphpmax pgsql postgres phpmax_
2022-05-23 17:14:18 +00:00
2021-12-22 18:29:22 +00:00
- name : phpmin-system-mysql
depends_on :
2022-10-22 11:59:27 +00:00
- phpmax-api-mysql
2021-12-22 18:29:22 +00:00
- phpmax-api-postgres
2022-08-24 19:30:50 +00:00
image : joomlaprojects/docker-images:cypress
2022-10-22 11:59:27 +00:00
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2020-01-01 10:44:50 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
2019-05-05 10:29:49 +00:00
commands :
2022-08-24 19:30:50 +00:00
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysql mysqli mysql
2018-04-01 14:26:37 +00:00
2022-10-22 11:59:27 +00:00
- name : phpmin-system-postgres
2022-01-10 09:30:21 +00:00
depends_on :
2022-10-22 11:59:27 +00:00
- phpmax-api-mysql
2022-05-23 17:14:18 +00:00
- phpmax-api-postgres
2022-10-22 11:59:27 +00:00
image : joomlaprojects/docker-images:cypress
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2021-12-22 18:29:22 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
commands :
2022-10-22 11:59:27 +00:00
- bash tests/cypress/drone-system-run.sh "$(pwd)" cpostgres pgsql postgres
2021-12-28 14:13:29 +00:00
2022-10-22 11:59:27 +00:00
- name : phpmax-system-mysql
2022-01-10 09:30:21 +00:00
depends_on :
2022-10-21 15:52:39 +00:00
- phpmin-system-mysql
2022-10-22 11:59:27 +00:00
- phpmin-system-postgres
image : joomlaprojects/docker-images:cypress8.1
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2021-12-22 18:29:22 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
commands :
2022-10-22 11:59:27 +00:00
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysqlmax mysqli mysql
2018-04-01 14:26:37 +00:00
2021-12-28 14:13:29 +00:00
- name : phpmax-system-postgres
2022-01-10 09:30:21 +00:00
depends_on :
2022-10-21 15:52:39 +00:00
- phpmin-system-mysql
2022-10-22 11:59:27 +00:00
- phpmin-system-postgres
2022-08-24 19:30:50 +00:00
image : joomlaprojects/docker-images:cypress8.1
2022-10-22 11:59:27 +00:00
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2021-12-22 18:29:22 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
commands :
2022-08-24 19:30:50 +00:00
- bash tests/cypress/drone-system-run.sh "$(pwd)" cpostgresmax pgsql postgres
2021-12-22 18:29:22 +00:00
- name : phpmin-system-mysql8
2022-05-23 09:40:26 +00:00
depends_on :
2022-10-22 11:59:27 +00:00
- phpmax-system-mysql
2022-05-23 17:14:18 +00:00
- phpmax-system-postgres
2022-08-24 19:30:50 +00:00
image : joomlaprojects/docker-images:cypress
2022-10-22 11:59:27 +00:00
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2020-01-01 10:44:50 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
2019-10-12 17:47:22 +00:00
commands :
2022-08-24 19:30:50 +00:00
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysql8 mysqli mysql8
2021-12-22 18:29:22 +00:00
2022-05-23 09:40:26 +00:00
- name : phpmax-system-mysql8
depends_on :
2022-10-23 08:44:08 +00:00
- phpmin-system-mysql8
2022-08-24 19:30:50 +00:00
image : joomlaprojects/docker-images:cypress8.1
2022-10-22 11:59:27 +00:00
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
2020-01-01 10:44:50 +00:00
environment :
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK : 1
2019-10-12 17:47:22 +00:00
commands :
2022-08-24 19:30:50 +00:00
- bash tests/cypress/drone-system-run.sh "$(pwd)" cmysql8max mysqli mysql8
2022-05-23 09:40:26 +00:00
2019-06-30 08:39:27 +00:00
- name : artifacts-system-tests
2022-10-28 20:26:12 +00:00
image : joomlaprojects/docker-images:packager
2021-12-22 18:29:22 +00:00
depends_on :
- phpmax-system-mysql
- phpmax-system-mysql8
- phpmax-system-postgres
- phpmin-system-mysql
- phpmin-system-mysql8
- phpmin-system-postgres
- phpmax-api-mysql
- phpmax-api-postgres
- phpmin-api-mysql
- phpmin-api-postgres
2019-06-30 08:39:27 +00:00
environment :
FTP_USERNAME :
from_secret : ftpusername
FTP_PASSWORD :
from_secret : ftppassword
2022-10-23 10:49:26 +00:00
GITHUB_TOKEN :
from_secret : github_token
2019-06-30 08:39:27 +00:00
commands :
2022-10-28 20:26:12 +00:00
- export PLUGIN_DEST_DIR=/artifacts/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
2020-04-04 11:57:34 +00:00
- echo https://ci.joomla.org$PLUGIN_DEST_DIR
2022-10-28 20:26:12 +00:00
- rclone config create artifacts ftp host ci.joomla.org user $FTP_USERNAME port 21 pass $FTP_PASSWORD
- rclone mkdir artifacts:$PLUGIN_DEST_DIR
- rclone copy tests/cypress/output/ artifacts:$PLUGIN_DEST_DIR
2022-10-23 10:49:26 +00:00
- 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://ci.joomla.org$PLUGIN_DEST_DIR\"}" > /dev/null'
2019-06-30 08:39:27 +00:00
when :
status :
2019-10-12 17:47:22 +00:00
- failure
2019-03-07 18:16:06 +00:00
2019-05-05 10:29:49 +00:00
volumes :
2021-12-22 18:29:22 +00:00
- name : composer-cache
host :
path : /tmp/composer-cache
2022-10-22 11:59:27 +00:00
- name : cypress-cache
host :
path : /tmp/cypress-cache
2022-08-24 19:30:50 +00:00
- name : npm-cache
host :
path : /tmp/npm-cache
2022-09-15 14:06:40 +00:00
- name : certificates
host :
path : /tmp/certificates
2019-05-05 10:29:49 +00:00
2018-03-31 14:19:44 +00:00
services :
2019-05-05 10:29:49 +00:00
- name : mysql
2018-03-31 14:19:44 +00:00
image : mysql:5.7
environment :
MYSQL_USER : joomla_ut
MYSQL_PASSWORD : joomla_ut
MYSQL_ROOT_PASSWORD : joomla_ut
2018-04-05 05:53:49 +00:00
MYSQL_DATABASE : test_joomla
2018-03-31 14:19:44 +00:00
2019-07-24 20:54:26 +00:00
- name : mysql8
image : mysql:8
command : [ "--default-authentication-plugin=mysql_native_password" ]
environment :
MYSQL_USER : joomla_ut
MYSQL_PASSWORD : joomla_ut
MYSQL_ROOT_PASSWORD : joomla_ut
MYSQL_DATABASE : test_joomla
2019-05-05 10:29:49 +00:00
- name : postgres
2020-02-29 23:02:27 +00:00
image : postgres:11-alpine
2019-05-20 07:14:27 +00:00
ports :
- 5432
environment :
POSTGRES_USER : root
POSTGRES_PASSWORD : joomla_ut
POSTGRES_DB : test_joomla
2019-05-05 10:29:49 +00:00
2022-10-23 08:24:52 +00:00
- name : openldap
image : bitnami/openldap:latest
ports :
- 1389
- 1636
volumes :
- name : certificates
path : /certificates
environment :
LDAP_ADMIN_USERNAME : admin
LDAP_ADMIN_PASSWORD : adminpassword
LDAP_USERS : customuser
LDAP_PASSWORDS : custompassword
LDAP_ENABLE_TLS : yes
LDAP_TLS_CERT_FILE : /certificates/openldap.crt
LDAP_TLS_KEY_FILE : /certificates/openldap.key
LDAP_TLS_CA_FILE : /certificates/CA.crt
BITNAMI_DEBUG : true
LDAP_CONFIG_ADMIN_ENABLED : yes
LDAP_CONFIG_ADMIN_USERNAME : admin
LDAP_CONFIG_ADMIN_PASSWORD : configpassword
2020-04-06 22:31:09 +00:00
---
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 :
2020-04-26 10:37:24 +00:00
- if [ $DRONE_REPO_NAME != 'joomla-cms' ]; then echo "The packager only runs on the joomla/joomla-cms repo"; exit 0; fi
2020-04-06 22:31:09 +00:00
- /bin/drone_build.sh
2020-05-11 18:47:19 +00:00
volumes :
- name : reference
path : /reference
when :
branch :
2022-07-26 20:49:58 +00:00
- 4.3 -dev
2020-04-06 22:31:09 +00:00
2022-05-25 07:32:45 +00:00
---
kind : pipeline
name : nightly_build
steps :
- name : prepare
image : joomlaprojects/docker-images:packager
commands :
- export MINORVERSION=${DRONE_BRANCH%-*}
- composer --version
- mkdir -p transfer
- date +%s > transfer/$MINORVERSION-time.txt
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2
- mv build/tmp/packages/* transfer/
- name : upload
image : joomlaprojects/docker-images:packager
environment :
nightly_key :
from_secret : nightly_key
nightly_user :
from_secret : nightly_user
nightly_host :
from_secret : nightly_host
RINGCENTRAL_WEBHOOK :
from_secret : notification_url
commands :
- export MINORVERSION=${DRONE_BRANCH%-*}
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- echo "$nightly_key" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-add
- rclone config create nightly sftp host $nightly_host user $nightly_user port 22
- rclone delete nightly:/home/devj/public_html/nightlies/ --include "Joomla_$MINORVERSION.*"
- rclone delete nightly:/home/devj/public_html/cache/com_content/
- rclone copy ./transfer/ nightly:/home/devj/public_html/nightlies/
2022-10-28 21:36:51 +00:00
- /bin/notify
2022-05-25 07:32:45 +00:00
- name : buildfailure
2022-10-28 21:36:51 +00:00
image : joomlaprojects/docker-images:packager
2022-05-25 07:32:45 +00:00
environment :
2022-10-28 21:36:51 +00:00
RINGCENTRAL_WEBHOOK :
from_secret : notification_url
commands :
- /bin/notify
2022-05-25 07:32:45 +00:00
when :
status :
- failure
trigger :
event :
- cron
- custom
repo :
- joomla/joomla-cms
2020-04-06 22:31:09 +00:00
2019-05-04 16:22:56 +00:00
---
kind : signature
2023-01-31 10:21:20 +00:00
hmac : 40893a317d8211d136371732e87096bc8015d0aff3ff849863ebe2ce00772a3d
2019-05-04 16:22:56 +00:00
...