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
|
2023-10-19 06:47:01 +00:00
|
|
|
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-10-28 15:07:54 +00:00
|
|
|
variables:
|
|
|
|
PHPUNIT_ARGS: --exclude integration
|
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:
|
2023-10-19 06:47:01 +00:00
|
|
|
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:
|
2023-11-01 10:08:50 +00:00
|
|
|
extends: .build-branch
|
|
|
|
variables:
|
2023-10-19 06:47:01 +00:00
|
|
|
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:
|
2023-11-01 10:09:29 +00:00
|
|
|
extends: .build-master-commit-only
|
|
|
|
variables:
|
2023-10-19 06:47:01 +00:00
|
|
|
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-10-21 17:32:31 +00:00
|
|
|
stage: publish
|
2023-04-01 06:34:54 +00:00
|
|
|
rules:
|
2023-04-06 17:27:04 +00:00
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PHPDOC_DEPLOY_SSH_KEY != null
|
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
|
|
|
|
2023-10-29 06:21:48 +00:00
|
|
|
phpunit-integration:
|
|
|
|
image: ${PHP_IMAGE}
|
|
|
|
variables:
|
|
|
|
TEST_HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss
|
|
|
|
extends: .integration-test
|
|
|
|
script:
|
|
|
|
- export K8S_NAMESPACE=$(kubectl get pods -o=custom-columns=NS:.metadata.namespace | tail -1)
|
|
|
|
- export API_URL="http://tt-rss-${CI_COMMIT_SHORT_SHA}-app.$K8S_NAMESPACE.svc.cluster.local/tt-rss/api/"
|
|
|
|
- php82 vendor/bin/phpunit --group integration
|
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
|
2023-10-29 05:58:13 +00:00
|
|
|
selenium:
|
2023-10-22 10:35:01 +00:00
|
|
|
image: ${SELENIUM_IMAGE}
|
2023-10-21 16:55:15 +00:00
|
|
|
variables:
|
|
|
|
TEST_HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss
|
2023-10-22 10:35:01 +00:00
|
|
|
SELENIUM_GRID_ENDPOINT: http://selenium-hub.selenium-grid.svc.cluster.local:4444/wd/hub
|
2023-10-21 16:55:15 +00:00
|
|
|
extends: .integration-test
|
2023-10-21 17:59:26 +00:00
|
|
|
script:
|
2023-10-22 10:42:41 +00:00
|
|
|
- export K8S_NAMESPACE=$(kubectl get pods -o=custom-columns=NS:.metadata.namespace | tail -1)
|
2023-10-22 10:35:01 +00:00
|
|
|
- python3 tests/integration/selenium_test.py
|
2023-10-21 16:55:15 +00:00
|
|
|
rules:
|
2023-10-29 06:19:35 +00:00
|
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
needs:
|
|
|
|
- job: phpunit-integration
|
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
|
2023-10-22 16:12:51 +00:00
|
|
|
|
|
|
|
update-demo:
|
2023-10-22 16:26:31 +00:00
|
|
|
stage: publish
|
2023-10-22 16:12:51 +00:00
|
|
|
image: ${HELM_IMAGE}
|
|
|
|
variables:
|
|
|
|
HELM_REPO: https://gitlab.tt-rss.org/tt-rss/helm-charts/tt-rss
|
|
|
|
script:
|
|
|
|
- git clone ${HELM_REPO} chart
|
2023-10-22 16:24:19 +00:00
|
|
|
- helm upgrade --atomic --install tt-rss-demo chart --values .helm/values-demo.yaml --set imageTag=${CI_COMMIT_SHORT_SHA}
|
2023-10-22 16:26:31 +00:00
|
|
|
rules:
|
2023-10-22 16:27:42 +00:00
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_REGISTRY_USER != null && $UPDATE_DEMO == "true"
|
2023-10-22 16:12:51 +00:00
|
|
|
|