3 name: Check messages.po
6 - name: Run default Xgettext
7 image: friendicaci/transifex
9 - ./bin/run_xgettext.sh
12 image: friendicaci/transifex
24 - ./bin/composer.phar run lint
34 - ./bin/composer.phar run lint
44 - ./bin/composer.phar run lint
56 image: meltwater/drone-cache:dev
60 cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}'
61 archive_format: "gzip"
67 - name: Install dependencies
70 - export COMPOSER_HOME=.composer
71 - ./bin/composer.phar run cs:install
73 image: meltwater/drone-cache:dev
77 cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}'
78 archive_format: "gzip"
84 - name: Run coding standards check
85 image: friendicaci/php-cs
87 - export CHANGED_FILES="$(git diff --name-status ${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER} | grep ^A | cut -f2)"
93 path: /tmp/drone-cache
103 - name: Restore cache
104 image: meltwater/drone-cache:dev
106 backend: "filesystem"
108 cache_key: '{{ .Repo.Name }}_php73_{{ arch }}_{{ os }}'
109 archive_format: "gzip"
115 - name: Composer install
116 image: friendicaci/php7.3:php7.3.28
118 - export COMPOSER_HOME=.composer
119 - ./bin/composer.phar validate
120 - ./bin/composer.phar install --prefer-dist
121 - name: Rebuild cache
122 image: meltwater/drone-cache:dev
124 backend: "filesystem"
126 cache_key: '{{ .Repo.Name }}_php73_{{ arch }}_{{ os }}'
127 archive_format: "gzip"
133 - name: Test Friendica
134 image: friendicaci/php7.3:php7.3.28
136 MYSQL_HOST: "mariadb"
138 MYSQL_DATABASE: "test"
139 MYSQL_PASSWORD: "test"
142 MEMCACHED_HOST: "memcached"
143 MEMCACHE_HOST: "memcached"
145 - cp config/local-sample.config.php config/local.config.php
146 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
147 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
148 - phpunit --configuration tests/phpunit.xml
152 image: mariadb:latest
154 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
155 MYSQL_DATABASE: "test"
156 MYSQL_PASSWORD: "test"
170 path: /tmp/drone-cache
180 - name: Restore cache
181 image: meltwater/drone-cache:dev
183 backend: "filesystem"
185 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
186 archive_format: "gzip"
192 - name: Composer install
193 image: friendicaci/php7.4:php7.4.18
195 - export COMPOSER_HOME=.composer
196 - ./bin/composer.phar validate
197 - ./bin/composer.phar install --prefer-dist
198 - name: Rebuild cache
199 image: meltwater/drone-cache:dev
201 backend: "filesystem"
203 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
204 archive_format: "gzip"
210 - name: Test Friendica
211 image: friendicaci/php7.4:php7.4.18
213 MYSQL_HOST: "mariadb"
215 MYSQL_DATABASE: "test"
216 MYSQL_PASSWORD: "test"
219 MEMCACHED_HOST: "memcached"
220 MEMCACHE_HOST: "memcached"
221 XDEBUG_MODE: "coverage"
224 - cp config/local-sample.config.php config/local.config.php
225 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
226 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
227 - phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
229 image: plugins/codecov
232 - friendica/friendica
235 from_secret: codecov-token
241 image: mariadb:latest
243 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
244 MYSQL_DATABASE: "test"
245 MYSQL_PASSWORD: "test"
259 path: /tmp/drone-cache
269 - name: Restore cache
270 image: meltwater/drone-cache:dev
272 backend: "filesystem"
274 cache_key: '{{ .Repo.Name }}_php80_{{ arch }}_{{ os }}'
275 archive_format: "gzip"
281 - name: Composer install
282 image: friendicaci/php8.0:php8.0.5
284 - export COMPOSER_HOME=.composer
285 - ./bin/composer.phar validate
286 - ./bin/composer.phar install --prefer-dist
287 - name: Rebuild cache
288 image: meltwater/drone-cache:dev
290 backend: "filesystem"
292 cache_key: '{{ .Repo.Name }}_php80_{{ arch }}_{{ os }}'
293 archive_format: "gzip"
299 - name: Test Friendica
300 image: friendicaci/php8.0:php8.0.5
302 MYSQL_HOST: "mariadb"
304 MYSQL_DATABASE: "test"
305 MYSQL_PASSWORD: "test"
308 MEMCACHED_HOST: "memcached"
309 MEMCACHE_HOST: "memcached"
311 - cp config/local-sample.config.php config/local.config.php
312 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
313 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
314 - phpunit --configuration tests/phpunit.xml
318 image: mariadb:latest
320 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
321 MYSQL_DATABASE: "test"
322 MYSQL_PASSWORD: "test"
336 path: /tmp/drone-cache
340 name: continuous-deployment
349 - friendica/friendica
357 node: releaser # This prevents executing this pipeline at other servers than drone.friendi.ca
360 - name: Restore cache
361 image: meltwater/drone-cache:dev
363 backend: "filesystem"
365 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
366 archive_format: "gzip"
373 - name: Composer install
374 image: friendicaci/php7.4:php7.4.18
376 - export COMPOSER_HOME=.composer
378 - composer install --no-dev --optimize-autoloader
379 - name: Create artifacts
383 - apt-get install bzip2
385 - export VERSION="$(cat VERSION)"
387 - export RELEASE="friendica-full-$VERSION"
388 - export ARTIFACT="$RELEASE.tar.gz"
390 --transform "s,^,$RELEASE/,"
391 -X mods/release-list-exclude.txt
392 -T mods/release-list-include.txt
393 -cvzf ./build/$ARTIFACT
394 - # calculate SHA256 checksum
396 - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
398 - # output the sha256 sum for checking
399 - cat "$ARTIFACT.sum256"
400 - sha256sum "$ARTIFACT"
401 - name: Sign artifacts
402 image: plugins/gpgsign
407 from_secret: gpg_password
413 - name: Upload artifacts
417 from_secret: sftp_host
419 from_secret: sftp_user
426 - apk add lftp openssh openssl
428 - chmod 400 drone.key
429 - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key
432 set net:max-retries 2;
433 set net:reconnect-interval-base 5;
434 set sftp:auto-confirm true;
435 set sftp:connect-program 'ssh -q -a -x -i drone.key';
436 connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT;
445 path: /tmp/drone-cache
449 name: release-deployment
458 - friendica/friendica
465 node: releaser # This prevents executing this pipeline at other servers than drone.friendi.ca
468 - name: Restore cache
469 image: meltwater/drone-cache:dev
471 backend: "filesystem"
473 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
474 archive_format: "gzip"
481 - name: Composer install
482 image: friendicaci/php7.4:php7.4.18
484 - export COMPOSER_HOME=.composer
486 - composer install --no-dev --optimize-autoloader
487 - name: Create artifacts
491 - apt-get install bzip2
493 - export VERSION="$(cat VERSION)"
495 - export RELEASE="friendica-full-$VERSION"
496 - export ARTIFACT="$RELEASE.tar.gz"
498 --transform "s,^,$RELEASE/,"
499 -X mods/release-list-exclude.txt
500 -T mods/release-list-include.txt
501 -cvzf ./build/$ARTIFACT
502 - # calculate SHA256 checksum
504 - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
506 - # output the sha256 sum for checking
507 - cat "$ARTIFACT.sum256"
508 - sha256sum "$ARTIFACT"
509 - name: Sign artifacts
510 image: plugins/gpgsign
515 from_secret: gpg_password
521 - name: Upload artifacts
525 from_secret: sftp_host
527 from_secret: sftp_user
534 - apk add lftp openssh openssl
536 - chmod 400 drone.key
537 - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key
540 set net:max-retries 2;
541 set net:reconnect-interval-base 5;
542 set sftp:auto-confirm true;
543 set sftp:connect-program 'ssh -q -a -x -i drone.key';
544 connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT;
553 path: /tmp/drone-cache