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
100 - name: Restore cache
101 image: meltwater/drone-cache:dev
103 backend: "filesystem"
105 cache_key: '{{ .Repo.Name }}_php73_{{ arch }}_{{ os }}'
106 archive_format: "gzip"
112 - name: Composer install
113 image: friendicaci/php7.3:php7.3.28
115 - export COMPOSER_HOME=.composer
116 - ./bin/composer.phar validate
117 - ./bin/composer.phar install --prefer-dist
118 - name: Rebuild cache
119 image: meltwater/drone-cache:dev
121 backend: "filesystem"
123 cache_key: '{{ .Repo.Name }}_php73_{{ arch }}_{{ os }}'
124 archive_format: "gzip"
130 - name: Test Friendica
131 image: friendicaci/php7.3:php7.3.28
133 MYSQL_HOST: "mariadb"
135 MYSQL_DATABASE: "test"
136 MYSQL_PASSWORD: "test"
139 MEMCACHED_HOST: "memcached"
140 MEMCACHE_HOST: "memcached"
142 - cp config/local-sample.config.php config/local.config.php
143 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
144 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
145 - phpunit --configuration tests/phpunit.xml
149 image: mariadb:latest
151 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
152 MYSQL_DATABASE: "test"
153 MYSQL_PASSWORD: "test"
167 path: /tmp/drone-cache
174 - name: Restore cache
175 image: meltwater/drone-cache:dev
177 backend: "filesystem"
179 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
180 archive_format: "gzip"
186 - name: Composer install
187 image: friendicaci/php7.4:php7.4.18
189 - export COMPOSER_HOME=.composer
190 - ./bin/composer.phar validate
191 - ./bin/composer.phar install --prefer-dist
192 - name: Rebuild cache
193 image: meltwater/drone-cache:dev
195 backend: "filesystem"
197 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
198 archive_format: "gzip"
204 - name: Test Friendica
205 image: friendicaci/php7.4:php7.4.18
207 MYSQL_HOST: "mariadb"
209 MYSQL_DATABASE: "test"
210 MYSQL_PASSWORD: "test"
213 MEMCACHED_HOST: "memcached"
214 MEMCACHE_HOST: "memcached"
215 XDEBUG_MODE: "coverage"
218 - cp config/local-sample.config.php config/local.config.php
219 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
220 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
221 - phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
223 image: plugins/codecov
226 - friendica/friendica
229 from_secret: codecov-token
235 image: mariadb:latest
237 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
238 MYSQL_DATABASE: "test"
239 MYSQL_PASSWORD: "test"
253 path: /tmp/drone-cache
260 - name: Restore cache
261 image: meltwater/drone-cache:dev
263 backend: "filesystem"
265 cache_key: '{{ .Repo.Name }}_php80_{{ arch }}_{{ os }}'
266 archive_format: "gzip"
272 - name: Composer install
273 image: friendicaci/php8.0:php8.0.5
275 - export COMPOSER_HOME=.composer
276 - ./bin/composer.phar validate
277 - ./bin/composer.phar install --prefer-dist
278 - name: Rebuild cache
279 image: meltwater/drone-cache:dev
281 backend: "filesystem"
283 cache_key: '{{ .Repo.Name }}_php80_{{ arch }}_{{ os }}'
284 archive_format: "gzip"
290 - name: Test Friendica
291 image: friendicaci/php8.0:php8.0.5
293 MYSQL_HOST: "mariadb"
295 MYSQL_DATABASE: "test"
296 MYSQL_PASSWORD: "test"
299 MEMCACHED_HOST: "memcached"
300 MEMCACHE_HOST: "memcached"
302 - cp config/local-sample.config.php config/local.config.php
303 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
304 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
305 - phpunit --configuration tests/phpunit.xml
309 image: mariadb:latest
311 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
312 MYSQL_DATABASE: "test"
313 MYSQL_PASSWORD: "test"
327 path: /tmp/drone-cache
331 name: continuous-deployment
335 - friendica/friendica
343 node: releaser # This prevents executing this pipeline at other servers than drone.friendi.ca
346 - name: Restore cache
347 image: meltwater/drone-cache:dev
349 backend: "filesystem"
351 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
352 archive_format: "gzip"
359 - name: Composer install
360 image: friendicaci/php7.4:php7.4.18
362 - export COMPOSER_HOME=.composer
364 - composer install --no-dev --optimize-autoloader
365 - name: Create artifacts
369 - apt-get install bzip2
371 - export VERSION="$(cat VERSION)"
373 - export RELEASE="friendica-full-$VERSION"
374 - export ARTIFACT="$RELEASE.tar.gz"
376 --transform "s,^,$RELEASE/,"
377 -X mods/release-list-exclude.txt
378 -T mods/release-list-include.txt
379 -cvjf ./build/$ARTIFACT
380 - # calculate SHA256 checksum
382 - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
384 - # output the sha256 sum for checking
385 - cat "$ARTIFACT.sum256"
386 - sha256sum "$ARTIFACT"
387 - name: Upload artifacts
391 from_secret: sftp_host
393 from_secret: sftp_user
400 - apk add lftp openssh openssl
402 - chmod 400 drone.key
403 - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key
406 set net:max-retries 2;
407 set net:reconnect-interval-base 5;
408 set sftp:auto-confirm true;
409 set sftp:connect-program 'ssh -q -a -x -i drone.key';
410 connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT;
419 path: /tmp/drone-cache
423 name: release-deployment
427 - friendica/friendica
434 node: releaser # This prevents executing this pipeline at other servers than drone.friendi.ca
437 - name: Restore cache
438 image: meltwater/drone-cache:dev
440 backend: "filesystem"
442 cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
443 archive_format: "gzip"
450 - name: Composer install
451 image: friendicaci/php7.4:php7.4.18
453 - export COMPOSER_HOME=.composer
455 - composer install --no-dev --optimize-autoloader
456 - name: Create artifacts
460 - apt-get install bzip2
462 - export VERSION="$(cat VERSION)"
464 - export VERSION="$(cat VERSION)"
466 - export RELEASE="friendica-full-$VERSION"
467 - export ARTIFACT="$RELEASE.tar.gz"
469 --transform "s,^,$RELEASE/,"
470 -X mods/release-list-exclude.txt
471 -T mods/release-list-include.txt
472 -cvjf ./build/$ARTIFACT
473 - # calculate SHA256 checksum
475 - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
477 - # output the sha256 sum for checking
478 - cat "$ARTIFACT.sum256"
479 - sha256sum "$ARTIFACT"
480 - name: Upload artifacts
484 from_secret: sftp_host
486 from_secret: sftp_user
493 - apk add lftp openssh openssl
495 - chmod 400 drone.key
496 - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key
499 set net:max-retries 2;
500 set net:reconnect-interval-base 5;
501 set sftp:auto-confirm true;
502 set sftp:connect-program 'ssh -q -a -x -i drone.key';
503 connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT;
512 path: /tmp/drone-cache