2019-08-13 00:31:05 +00:00
---
kind : pipeline
name : default
steps :
2023-05-15 20:28:55 +00:00
- name : composer
image : joomlaprojects/docker-images:php8.2
volumes :
- name : composer-cache
path : /tmp/composer-cache
commands :
2023-05-18 15:38:28 +00:00
- composer install --no-progress
2023-05-15 20:28:55 +00:00
- name : npm
image : node:16-bullseye-slim
depends_on : [ composer ]
volumes :
- name : npm-cache
path : /tmp/npm-cache
environment :
npm_config_cache : /tmp/npm-cache
commands :
- npm i --unsafe-perm
- name : prepare_system_tests
depends_on :
- npm
image : joomlaprojects/docker-images:systemtests
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
commands :
- mv cypress.config.dist.js cypress.config.js
- npx cypress install
- npx cypress verify
- vendor/bin/robo build
2023-05-18 15:38:28 +00:00
- curl https://joomla.org/latest -L --output joomla.zip
2023-05-15 20:28:55 +00:00
- name : phpmin-system-mysql
depends_on :
- prepare_system_tests
image : joomlaprojects/docker-images:cypress
volumes :
- name : cypress-cache
path : /root/.cache/Cypress
commands :
- mkdir /tests/www/mysql/
2023-05-18 15:38:28 +00:00
- cp joomla.zip /tests/www/mysql/joomla.zip
- cp dist/pkg-weblinks-current.zip /tests/www/mysql/pkg-weblinks-current.zip
2023-05-15 20:28:55 +00:00
- cd /tests/www/mysql/
- unzip joomla.zip
- apache2ctl -D FOREGROUND &
- chmod +rwx /root
- php installation/joomla.php install --verbose --site-name="Joomla CMS test" --admin-email=admin@example.org --admin-username=ci-admin --admin-user="jane doe" --admin-password=joomla-17082005 --db-type=mysqli --db-host=mysql --db-name=test_joomla --db-pass=joomla_ut --db-user=root --db-encryption=0 --db-prefix=mysql_
2023-05-18 15:38:28 +00:00
- php cli/joomla.php config:set debug=true error_reporting=maximum
- php cli/joomla.php extension:install --path=/tests/www/mysql/pkg-weblinks-current.zip
2023-05-18 15:55:27 +00:00
- cd /drone/src
2023-05-15 20:28:55 +00:00
- npx cypress run --browser=firefox --e2e --config baseUrl=http://localhost/mysql,screenshotsFolder=/drone/src/tests/cypress/output/screenshots
2023-05-18 16:01:39 +00:00
- name : artifacts-system-tests
image : joomlaprojects/docker-images:packager
depends_on :
- phpmin-system-mysql
environment :
FTP_USERNAME :
from_secret : ftpusername
FTP_PASSWORD :
from_secret : ftppassword
GITHUB_TOKEN :
from_secret : github_token
commands :
- export PLUGIN_DEST_DIR=/artifacts/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
- echo https://ci.joomla.org$PLUGIN_DEST_DIR
- 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
- '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'
when :
status :
- failure
2019-08-13 00:31:05 +00:00
volumes :
- name : weblinks_cache
host :
path : /tmp/weblinks_cache
2023-05-15 20:28:55 +00:00
- name : composer-cache
host :
path : /tmp/composer-cache
- name : cypress-cache
host :
path : /tmp/cypress-cache
- name : npm-cache
host :
path : /tmp/npm-cache
services :
- name : mysql
image : mysql:5.7
environment :
MYSQL_USER : joomla_ut
MYSQL_PASSWORD : joomla_ut
MYSQL_ROOT_PASSWORD : joomla_ut
MYSQL_DATABASE : test_joomla
- 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
- name : postgres
image : postgres:11-alpine
ports :
- 5432
environment :
POSTGRES_USER : root
POSTGRES_PASSWORD : joomla_ut
POSTGRES_DB : test_joomla
2019-08-13 00:31:05 +00:00
---
kind : signature
2023-05-18 16:01:39 +00:00
hmac : b2d4dd23da55c06ea35eaa184db5172624d15edfa7cdcf5659cce885cd96242b
2019-08-13 00:31:05 +00:00
...