BlueGit

projects-timfalken-com verhalenboek

Pipeline Editor

Pipelines Pipeline Editor

Pipeline Editor

No issues found

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
# BlueGit CI (git.timfalken.com). Secrets: timftp* from group projects.timfalken.com, projectftp from this repo (all protected: master only).
stages:
- test
- deploy
php_tests:
stage: test
image: php:8.3-cli-bookworm
before_script:
- apt-get update -qq
- apt-get install -y --no-install-recommends python3 libonig-dev
- docker-php-ext-install mbstring
script:
- find web -name '*.php' -not -path '*/artifacts/*' -print0 | xargs -0 -n1 php -l
- php -r 'foreach (["pdo_sqlite", "curl", "mbstring", "openssl"] as $extension) { if (!extension_loaded($extension)) { fwrite(STDERR, "Missing extension " . $extension); exit(1); } }'
- php web/tests/storybook.php
- python3 web/tests/startup.py
- python3 web/tests/integration.py
- python3 web/tests/pwa.py
- python3 web/tests/feed.py
frontend_checks:
stage: test
image: node:22-bookworm-slim
script:
- node --check web/assets/app.js
- node --check web/assets/pwa.js
- node --check web/sw.js
# A real FTP fixture verifies that mirroring preserves production data and secrets.
deploy_tests:
stage: test
image: debian:bookworm-slim
before_script:
- apt-get update -qq
- apt-get install -y --no-install-recommends python3 python3-pyftpdlib lftp ca-certificates openssh-client
script:
- python3 ci/test_deploy.py
ftp_upload:
stage: deploy
image: debian:bookworm-slim
resource_group: production
environment:
name: production
# Deploy only after every test job passed; a failed test means no deploy.
needs: [php_tests, frontend_checks, deploy_tests]
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE != "merge_request_event"'
before_script:
- apt-get update -qq
- apt-get install -y --no-install-recommends python3 lftp ca-certificates openssh-client
script:
- python3 ci/deploy_guard.py
- python3 ci/deploy.py