From 7ad6c3ec641d0b89d072dc9b32202aebb8ecaf8d Mon Sep 17 00:00:00 2001 From: supahgreg Date: Sat, 11 Oct 2025 21:17:31 +0000 Subject: Remove assorted unused stuff. --- .docker/phpdoc/Dockerfile | 5 - .docker/phpdoc/redirects.conf | 2 - .gitlab-ci.yml | 266 ------------------------------------------ .vscode/launch.json | 24 ---- .vscode/tasks.json | 46 -------- utils/autoMergeRequest.sh | 35 ------ utils/phpstan-watcher.sh | 23 ---- utils/phpunit-integration.sh | 7 -- utils/phpunit.sh | 7 -- 9 files changed, 415 deletions(-) delete mode 100644 .docker/phpdoc/Dockerfile delete mode 100644 .docker/phpdoc/redirects.conf delete mode 100644 .gitlab-ci.yml delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/tasks.json delete mode 100755 utils/autoMergeRequest.sh delete mode 100755 utils/phpstan-watcher.sh delete mode 100755 utils/phpunit-integration.sh delete mode 100755 utils/phpunit.sh diff --git a/.docker/phpdoc/Dockerfile b/.docker/phpdoc/Dockerfile deleted file mode 100644 index 3d86c300c..000000000 --- a/.docker/phpdoc/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -ARG PROXY_REGISTRY -FROM ${PROXY_REGISTRY}nginxinc/nginx-unprivileged:1-alpine - -COPY ./phpdoc /usr/share/nginx/html/ttrss-docs -COPY .docker/phpdoc/redirects.conf /etc/nginx/conf.d/ diff --git a/.docker/phpdoc/redirects.conf b/.docker/phpdoc/redirects.conf deleted file mode 100644 index 1f1ed3118..000000000 --- a/.docker/phpdoc/redirects.conf +++ /dev/null @@ -1,2 +0,0 @@ -port_in_redirect off; -absolute_redirect off; diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index b7cd4d44a..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,266 +0,0 @@ -stages: - - lint - - build - - push - - test - - publish - -variables: - ESLINT_PATHS: js plugins - REGISTRY_PROJECT: cthulhoo - IMAGE_TAR_FPM: image-fpm.tar - IMAGE_TAR_WEB: image-web.tar - -include: - - project: 'ci/ci-templates' - ref: master - file: .ci-build-docker-kaniko.yml - - project: 'ci/ci-templates' - ref: master - file: .ci-registry-push.yml - - project: 'ci/ci-templates' - ref: master - file: .ci-lint-common.yml - - project: 'ci/ci-templates' - ref: master - file: .ci-update-helm-imagetag.yml - -phpunit: - extends: .phpunit - variables: - PHPUNIT_ARGS: --exclude integration --coverage-filter classes --coverage-filter include - -eslint: - extends: .eslint - -phpstan: - extends: .phpstan - -ttrss-fpm-pgsql-static:build: - extends: .build-docker-kaniko-no-push - variables: - DOCKERFILE: ${CI_PROJECT_DIR}/.docker/app/Dockerfile - IMAGE_TAR: ${IMAGE_TAR_FPM} - -ttrss-fpm-pgsql-static:push-commit-only-gitlab: - extends: .crane-image-registry-push-commit-only-gitlab - variables: - IMAGE_TAR: ${IMAGE_TAR_FPM} - needs: - - job: ttrss-fpm-pgsql-static:build - -ttrss-web-nginx:build: - extends: .build-docker-kaniko-no-push - variables: - DOCKERFILE: ${CI_PROJECT_DIR}/.docker/web-nginx/Dockerfile - IMAGE_TAR: ${IMAGE_TAR_WEB} - -ttrss-web-nginx:push-commit-only-gitlab: - extends: .crane-image-registry-push-commit-only-gitlab - variables: - IMAGE_TAR: ${IMAGE_TAR_WEB} - needs: - - job: ttrss-web-nginx:build - -phpdoc:build: - image: ${PHP_IMAGE} - stage: publish - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - script: - - php84 /phpDocumentor.phar -d classes -d include -t phpdoc --visibility=public - artifacts: - paths: - - phpdoc - -phpdoc:publish: - extends: .build-docker-kaniko - stage: publish - needs: - - job: phpdoc:build - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $REGISTRY_USER != null && $REGISTRY_PASSWORD != null - variables: - DOCKERFILE: ${CI_PROJECT_DIR}/.docker/phpdoc/Dockerfile - NAME: ttrss-phpdoc - VERSION: latest - -phpunit-integration: - image: ${PHP_IMAGE} - variables: - POSTGRES_DB: postgres - POSTGRES_USER: postgres - POSTGRES_PASSWORD: password - TTRSS_DB_HOST: db - TTRSS_DB_USER: ${POSTGRES_USER} - TTRSS_DB_NAME: ${POSTGRES_DB} - TTRSS_DB_PASS: ${POSTGRES_PASSWORD} - FF_NETWORK_PER_BUILD: "true" - APP_WEB_ROOT: /builds/shared-root - APP_INSTALL_BASE_DIR: ${APP_WEB_ROOT} - APP_BASE: "/tt-rss" - APP_FASTCGI_PASS: app:9000 # skip resolver - AUTO_CREATE_USER: test - AUTO_CREATE_USER_PASS: 'test' - AUTO_CREATE_USER_ACCESS_LEVEL: '10' - AUTO_CREATE_USER_ENABLE_API: 'true' - APP_URL: http://web-nginx/tt-rss - API_URL: ${APP_URL}/api/ - HEALTHCHECK_URL: ${APP_URL}/public.php?op=healthcheck - __URLHELPER_ALLOW_LOOPBACK: 'true' - services: - - &svc_db - name: registry.fakecake.org/docker.io/postgres:15-alpine - alias: db - - &svc_app - name: ${CI_REGISTRY}/${CI_PROJECT_PATH}/ttrss-fpm-pgsql-static:${CI_COMMIT_SHORT_SHA} - alias: app - - &svc_web - name: ${CI_REGISTRY}/${CI_PROJECT_PATH}/ttrss-web-nginx:${CI_COMMIT_SHORT_SHA} - alias: web-nginx - rules: - - if: $CI_COMMIT_BRANCH - needs: - - job: ttrss-fpm-pgsql-static:push-commit-only-gitlab - - job: ttrss-web-nginx:push-commit-only-gitlab - before_script: - # wait for everything to start - - | - for a in `seq 1 15`; do - curl -fs ${HEALTHCHECK_URL} && break - sleep 5 - done - script: - - cp tests/integration/feed.xml ${APP_WEB_ROOT}/${APP_BASE}/ - - php84 vendor/bin/phpunit --group integration --do-not-cache-result --log-junit phpunit-report.xml --coverage-cobertura phpunit-coverage.xml --coverage-text --colors=never - artifacts: - when: always - reports: - junit: phpunit-report.xml - coverage_report: - coverage_format: cobertura - path: phpunit-coverage.xml - coverage: '/^\s*Lines:\s*\d+.\d+\%/' - -phpunit-integration:root-location: - variables: - APP_WEB_ROOT: /builds/shared-root/tt-rss - APP_INSTALL_BASE_DIR: /builds/shared-root - APP_BASE: "" - APP_URL: http://web-nginx - extends: phpunit-integration - -selenium: - extends: phpunit-integration - image: ${SELENIUM_IMAGE} - variables: - SELENIUM_GRID_ENDPOINT: http://selenium:4444/wd/hub - services: - - *svc_db - - *svc_app - - *svc_web - - name: registry.fakecake.org/docker.io/selenium/standalone-chrome:4.32.0-20250515 - alias: selenium - script: - - | - for i in `seq 1 10`; do - echo attempt $i... - python3 tests/integration/selenium_test.py && break - sleep 10 - done - artifacts: - when: always - reports: - junit: selenium-report.xml - -ttrss-fpm-pgsql-static:publish: - stage: publish - extends: .crane-image-registry-push-master - variables: - IMAGE_TAR: ${IMAGE_TAR_FPM} - needs: - - job: ttrss-fpm-pgsql-static:build - - job: phpunit-integration - - job: selenium - -ttrss-fpm-pgsql-static:publish-docker-hub: - stage: publish - extends: .crane-image-registry-push-master-docker-hub - variables: - IMAGE_TAR: ${IMAGE_TAR_FPM} - needs: - - job: ttrss-fpm-pgsql-static:build - - job: phpunit-integration - - job: selenium - -ttrss-fpm-pgsql-static:publish-gitlab: - stage: publish - extends: .crane-image-registry-push-master-gitlab - variables: - IMAGE_TAR: ${IMAGE_TAR_FPM} - needs: - - job: ttrss-fpm-pgsql-static:build - - job: phpunit-integration - - job: selenium - -ttrss-web-nginx:publish: - stage: publish - extends: .crane-image-registry-push-master - variables: - IMAGE_TAR: ${IMAGE_TAR_WEB} - needs: - - job: ttrss-web-nginx:build - - job: phpunit-integration - - job: selenium - -ttrss-web-nginx:publish-docker-hub: - stage: publish - extends: .crane-image-registry-push-master-docker-hub - variables: - IMAGE_TAR: ${IMAGE_TAR_WEB} - needs: - - job: ttrss-web-nginx:build - - job: phpunit-integration - - job: selenium - -ttrss-web-nginx:publish-gitlab: - stage: publish - extends: .crane-image-registry-push-master-gitlab - variables: - IMAGE_TAR: ${IMAGE_TAR_WEB} - needs: - - job: ttrss-web-nginx:build - - job: phpunit-integration - - job: selenium - -update-demo: - stage: publish - extends: .update-helm-imagetag - variables: - CHART_REPO: gitlab.fakecake.org/git/helm-charts/tt-rss.git - CHART_VALUES: values-demo.yaml - ACCESS_TOKEN: ${DEMO_HELM_TOKEN} - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $DEMO_HELM_TOKEN != null - -update-prod: - stage: publish - extends: .update-helm-imagetag - variables: - CHART_REPO: gitlab.fakecake.org/git/helm-charts/tt-rss-prod.git - CHART_VALUES: values-prod.yaml - ACCESS_TOKEN: ${PROD_HELM_TOKEN} - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $PROD_HELM_TOKEN != null - -# https://about.gitlab.com/blog/how-to-automatically-create-a-new-mr-on-gitlab-with-gitlab-ci/ -weblate-integration-auto-mr: - image: ${INFRA_IMAGE} - stage: publish - rules: - - if: $CI_COMMIT_BRANCH == "weblate-integration" && $AUTO_MR_TOKEN != null - script: - - HOST=${CI_PROJECT_URL} CI_PROJECT_ID=${CI_PROJECT_ID} - CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} - GITLAB_USER_ID=${GITLAB_USER_ID} - PRIVATE_TOKEN=${AUTO_MR_TOKEN} ./utils/autoMergeRequest.sh diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index b3911320d..000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Listen for XDebug", - "type": "php", - "request": "launch", - "pathMappings": { - "/var/www/html/tt-rss": "${workspaceRoot}", - }, - "port": 9000 - }, - { - "name": "Launch Chrome", - "request": "launch", - "type": "chrome", - "pathMapping": { - "/tt-rss/": "${workspaceFolder}" - }, - "urlFilter": "*/tt-rss/*", - "runtimeExecutable": "chrome.exe", - } - ] -} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index bd6a7790f..000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "type": "shell", - "label": "phpstan (watcher)", - "isBackground": true, - "problemMatcher": { - "fileLocation": [ - "relative", - "${workspaceRoot}" - ], - "owner": "phpstan-watcher", - "pattern": { - "regexp": "^/app/(.*?):([0-9\\?]*):(.*)$", - "file": 1, - "line": 2, - "message": 3 - }, - "background": { - "activeOnStart": true, - "beginsPattern": "Using configuration file", - "endsPattern": "All done" - } - }, - "command": "chmod +x ${workspaceRoot}/utils/phpstan-watcher.sh && ${workspaceRoot}/utils/phpstan-watcher.sh" - }, - { - "type": "shell", - "label": "phpunit", - "command": "chmod +x ${workspaceRoot}/utils/phpunit.sh && ${workspaceRoot}/utils/phpunit.sh", - "problemMatcher": [] - }, - { - "type": "gulp", - "task": "default", - "problemMatcher": [], - "label": "gulp: default", - "options": { - "env": { - "PATH": "${workspaceRoot}/node_modules/.bin:$PATH" - } - } - } - ] -} diff --git a/utils/autoMergeRequest.sh b/utils/autoMergeRequest.sh deleted file mode 100755 index bd33db0ca..000000000 --- a/utils/autoMergeRequest.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# Extract the host where the server is running, and add the URL to the APIs -[[ $HOST =~ ^https?://[^/]+ ]] && HOST="${BASH_REMATCH[0]}/api/v4/projects/" - -# Look which is the default branch -TARGET_BRANCH=`curl --silent "${HOST}${CI_PROJECT_ID}" --header "PRIVATE-TOKEN:${PRIVATE_TOKEN}" | python3 -c "import sys, json; print(json.load(sys.stdin)['default_branch'])"`; - -# The description of our new MR, we want to remove the branch after the MR has -# been closed -BODY="{ - \"id\": ${CI_PROJECT_ID}, - \"source_branch\": \"${CI_COMMIT_REF_NAME}\", - \"target_branch\": \"${TARGET_BRANCH}\", - \"remove_source_branch\": true, - \"title\": \"WIP: ${CI_COMMIT_REF_NAME}\", - \"assignee_id\":\"${GITLAB_USER_ID}\" -}"; - -# Require a list of all the merge request and take a look if there is already -# one with the same source branch -LISTMR=`curl --silent "${HOST}${CI_PROJECT_ID}/merge_requests?state=opened" --header "PRIVATE-TOKEN:${PRIVATE_TOKEN}"`; -COUNTBRANCHES=`echo ${LISTMR} | grep -o "\"source_branch\":\"${CI_COMMIT_REF_NAME}\"" | wc -l`; - -# No MR found, let's create a new one -if [ ${COUNTBRANCHES} -eq "0" ]; then - curl -X POST "${HOST}${CI_PROJECT_ID}/merge_requests" \ - --header "PRIVATE-TOKEN:${PRIVATE_TOKEN}" \ - --header "Content-Type: application/json" \ - --data "${BODY}"; - - echo "Opened a new merge request: WIP: ${CI_COMMIT_REF_NAME} and assigned to you"; - exit; -fi - -echo "No new merge request opened"; diff --git a/utils/phpstan-watcher.sh b/utils/phpstan-watcher.sh deleted file mode 100755 index 84554e68d..000000000 --- a/utils/phpstan-watcher.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -export PHP_IMAGE=registry.fakecake.org/infra/php8.4-alpine3.22 - -docker run --rm -v $(pwd):/app -v /tmp/phpstan:/tmp/phpstan \ - --workdir /app ${PHP_IMAGE} \ - php84 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw analyze . - -echo All done, RC=$?. - -while true; do - inotifywait . -e close_write -r -t 300 | grep -q .php && \ - ( - MODIFIED=$(git ls-files -m | grep .php) - - docker run --rm -v $(pwd):/app -v /tmp/phpstan:/tmp/phpstan \ - --workdir /app ${PHP_IMAGE} \ - php84 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G --error-format=raw analyze . - - echo All done, RC=$?. - ) - sleep 1 -done diff --git a/utils/phpunit-integration.sh b/utils/phpunit-integration.sh deleted file mode 100755 index 7ce458cf8..000000000 --- a/utils/phpunit-integration.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -export PHP_IMAGE=registry.fakecake.org/infra/php8.3-alpine3.20 - -docker run --rm -v $(pwd):/app -e API_URL=${API_URL} \ - --workdir /app ${PHP_IMAGE} \ - php83 -d memory_limit=-1 ./vendor/bin/phpunit --group integration diff --git a/utils/phpunit.sh b/utils/phpunit.sh deleted file mode 100755 index 667ff92f5..000000000 --- a/utils/phpunit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -export PHP_IMAGE=registry.fakecake.org/infra/php8.3-alpine3.20 - -docker run --rm -v $(pwd):/app \ - --workdir /app ${PHP_IMAGE} \ - php83 -d memory_limit=-1 ./vendor/bin/phpunit --exclude integration -- cgit v1.2.3-54-g00ecf