feat: mise à jour task phpstan avec baseline #1

Open
vcarroy wants to merge 2 commits from phpstan_baseline into develop
2 changed files with 15 additions and 32 deletions

View File

@ -32,6 +32,12 @@ deploy-dev: ## Déploie le projet dans le cluster (nécessite la variable $HARBO
delete-cluster: ## Supprime le cluster kubernetes Kind delete-cluster: ## Supprime le cluster kubernetes Kind
kind delete clusters tekton kind delete clusters tekton
docker-secret:
cp kustomization/base/tekton/secret/gitea/access_token.dist kustomization/base/tekton/secret/gitea/access_token
cp kustomization/base/tekton/secret/gitea/basicauth.dist kustomization/base/tekton/secret/gitea/basicauth
cp kustomization/base/tekton/secret/ssh/id_ed25519.dist kustomization/base/tekton/secret/ssh/id_ed25519
cp kustomization/base/tekton/secret/ssh/known_hosts.dist kustomization/base/tekton/secret/ssh/known_hosts
.mktools: .mktools:
rm -rf .mktools rm -rf .mktools
curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL) curl -q https://forge.cadoles.com/Cadoles/mktools/raw/branch/master/install.sh | $(SHELL)

View File

@ -3,41 +3,18 @@ kind: Task
metadata: metadata:
name: phpstan name: phpstan
spec: spec:
description: PHP-CS-Fixer on modified code description: Phpstan on modified code
workspaces: workspaces:
- name: source - name: source
params: params:
- name: apiurl - name: apiurl
- name: requestid - name: requestid
steps: steps:
- name: exec - name: analyse
image: ghcr.io/phpstan/phpstan:1 image: reg.cadoles.com/cadoles/phpstan
command: script: |
- /bin/sh #!/bin/sh
args:
- '-c'
- |
#set -e
echo ""
echo "== INSTALL PHPSTAN ======================================="
composer require phpstan/phpstan-symfony
composer require phpstan/phpstan-doctrine
cat << EOF > /app/phpstan.neon
includes:
- /app/vendor/phpstan/phpstan-symfony/extension.neon
- /app/vendor/phpstan/phpstan-doctrine/extension.neon
- /app/vendor/phpstan/phpstan-doctrine/rules.neon
EOF
echo ""
echo "== RUN PHPSTAN ===========================================" echo "== RUN PHPSTAN ==========================================="
cd $(workspaces.source.path) cd $(workspaces.source.path)
php $(which phpstan) analyse -l 1 --error-format=table src/ > temp_phpstan.txt phpstan analyse -l 5 --configuration phpstan-pipeline.neon --error-format table --no-progress > temp_phpstan.txt 2>&1
RESULT=$(cat temp_phpstan.txt) cat temp_phpstan.txt
Review

Je ne vois pas la pertinence d'utiliser une autre image, qui de plus est, fait la même chose que le script précédent.

Je ne vois pas la pertinence d'utiliser une autre image, qui de plus est, fait la même chose que le script précédent.
echo "${RESULT}"
echo ""
echo ""