ttrss/.gitlab-ci.yml

84 lines
2.0 KiB
YAML
Raw Normal View History

2023-04-01 04:19:16 +00:00
stages:
- lint
- build
2023-10-21 16:55:15 +00:00
- test
2023-10-21 17:17:32 +00:00
- publish
2023-04-01 04:19:16 +00:00
2023-04-02 09:30:33 +00:00
variables:
ESLINT_PATHS: js plugins
2023-04-01 04:19:16 +00:00
2023-04-02 09:30:33 +00:00
include:
- project: 'ci/ci-templates'
ref: master
file: .ci-build-docker-kaniko.yml
2023-04-02 09:30:33 +00:00
- project: 'ci/ci-templates'
ref: master
file: .ci-lint-common.yml
2023-10-21 16:55:15 +00:00
- project: 'ci/ci-templates'
ref: master
file: .ci-integration-test.yml
2023-04-01 04:19:16 +00:00
phpunit:
2023-04-02 09:30:33 +00:00
extends: .phpunit
2023-04-01 04:19:16 +00:00
eslint:
2023-04-02 09:32:28 +00:00
extends: .eslint
2023-04-01 04:19:16 +00:00
phpstan:
2023-04-02 09:30:33 +00:00
extends: .phpstan
2023-04-01 04:19:16 +00:00
2023-04-05 05:51:35 +00:00
ttrss-web-nginx:branch:
extends: .build-branch
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile
2023-04-05 05:51:35 +00:00
2023-10-21 17:17:32 +00:00
ttrss-fpm-pgsql-static:branch:
extends: .build-branch
2023-04-01 04:19:16 +00:00
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/app/Dockerfile
2023-04-05 05:51:35 +00:00
2023-10-21 17:17:32 +00:00
ttrss-web-nginx:
extends: .build-master-commit-only
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile
ttrss-fpm-pgsql-static:
extends: .build-master-commit-only
2023-04-05 05:51:35 +00:00
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/app/Dockerfile
2023-04-01 04:19:16 +00:00
2023-04-01 06:34:54 +00:00
phpdoc:
2023-10-14 12:18:32 +00:00
image: ${PHP_IMAGE}
2023-04-01 06:51:44 +00:00
stage: build
2023-04-01 06:34:54 +00:00
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "web" && $PHPDOC_DEPLOY_SSH_KEY != null
2023-04-01 06:34:54 +00:00
changes:
- '**/*.php'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PHPDOC_DEPLOY_SSH_KEY != null
2023-04-01 06:50:32 +00:00
when: manual
2023-04-01 06:34:54 +00:00
script:
2023-10-14 12:18:32 +00:00
- php82 /phpDocumentor.phar -d classes -d include -t phpdoc --visibility=public
2023-04-01 06:34:54 +00:00
- mkdir -p ~/.ssh &&
cp ${PHPDOC_DEPLOY_SSH_KEY} ~/.ssh/id_ed25519 &&
chmod 0600 ~/.ssh/id_ed25519
- rsync -av -e 'ssh -o StrictHostKeyChecking=no' phpdoc/ ${PHPDOC_DEPLOY_HOST}:phpdoc/
2023-10-21 16:55:15 +00:00
integration-test:
variables:
TEST_HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss
extends: .integration-test
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
2023-10-21 17:17:32 +00:00
ttrss-web-nginx:publish:
stage: publish
extends: .build-master
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile
ttrss-fpm-pgsql-static:publish:
stage: publish
extends: .build-master
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/.docker/app/Dockerfile