symfonyAppPipeline: use 'symfony php' command ton run tools
This commit is contained in:
@ -18,7 +18,7 @@ def call(String baseImage = 'ubuntu:22.04') {
|
||||
|
||||
stage('Install composer dependencies') {
|
||||
sh '''
|
||||
composer install
|
||||
symfony composer install
|
||||
'''
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ def call(String baseImage = 'ubuntu:22.04') {
|
||||
sh '''
|
||||
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "HEAD~..HEAD" | fgrep ".php" | tr "\n" " ")
|
||||
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)\\.php?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection -- %s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
|
||||
php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no --format junit ${EXTRA_ARGS} > php-cs-fixer.xml || true
|
||||
symfony php $(which php-cs-fixer) fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no --format junit ${EXTRA_ARGS} > php-cs-fixer.xml || true
|
||||
'''
|
||||
def report = sh(script: 'junit2md php-cs-fixer.xml', returnStdout: true)
|
||||
if (env.CHANGE_ID) {
|
||||
@ -70,7 +70,7 @@ def call(String baseImage = 'ubuntu:22.04') {
|
||||
writeFile file:'phpstan.neon', text:phpStanConfig
|
||||
}
|
||||
sh '''
|
||||
phpstan analyze -l 1 --error-format=table src > phpstan.txt || true
|
||||
symfony php $(which phpstan) analyze -l 1 --error-format=table src > phpstan.txt || true
|
||||
'''
|
||||
def report = sh(script: 'cat phpstan.txt', returnStdout: true)
|
||||
report = '## Rapport PHPStan\n\n```\n' + report
|
||||
|
Reference in New Issue
Block a user