-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 in DEV-MO/php-library from bugfix/ETS-25_suppor…
…t_php7.2 to master * commit '9251a322f244fbe55f0c9f1a78e22487fad9d459': [ETS-25] update README file [ETS-25] add ci-pipeline support [ETS-25] add support for php-7.2
- Loading branch information
Showing
26 changed files
with
476 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ composer.lock | |
#ignore SDK files | ||
example* | ||
helper* | ||
ratepay_credentials.php | ||
ratepay_credentials.php | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
pipeline { | ||
|
||
agent { | ||
label "php" | ||
} | ||
|
||
triggers { | ||
pollSCM('H */4 * * 1-5') | ||
} | ||
|
||
stages { | ||
stage('Build') { | ||
steps { | ||
echo "[STAGE] Build" | ||
sh "if [ -d build ]; then rm -rf build ; fi && mkdir -p build/logs" | ||
sh "composer install" | ||
} | ||
} | ||
stage('Test') { | ||
steps { | ||
echo "[STAGE] Test" | ||
sh ( | ||
returnStatus: true, | ||
script: "phpcs --report=checkstyle --report-file=./build/logs/checkstyle.xml --standard=PSR2 --extensions=php src/" | ||
) | ||
|
||
sh ( | ||
returnStatus: true, | ||
script: "phpmd src/ xml codesize,cleancode,design,naming,unusedcode,controversial --reportfile build/logs/pmd.xml" | ||
) | ||
|
||
// sh '''vendor/bin/phpunit --log-junit=build/junit.xml --coverage-html=build/coverage --coverage-clover=build/clover.xml''' | ||
} | ||
} | ||
stage('Report') { | ||
steps { | ||
echo "[STAGE] Report" | ||
checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'build/logs/checkstyle.xml', unHealthy: '' | ||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'build/logs/pmd.xml', unHealthy: '' | ||
// junit 'build/junit.xml' | ||
} | ||
} | ||
stage('Sonarqube') { | ||
agent { label "master" } | ||
when { | ||
branch 'master' | ||
} | ||
steps { | ||
script { | ||
def scannerHome = tool name: 'SonarQube Scanner 3.0.1', type: 'hudson.plugins.sonar.SonarRunnerInstallation'; | ||
echo "scannerHome = $scannerHome ...." | ||
withSonarQubeEnv() { | ||
sh "$scannerHome/bin/sonar-scanner -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_AUTH_TOKEN" | ||
} | ||
} | ||
} | ||
} | ||
stage('Deploy') { | ||
steps { | ||
echo "[STAGE] Deploy" | ||
} | ||
} | ||
} | ||
|
||
// post { | ||
// always { | ||
// node('master') { | ||
// step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "e.iriarte-mendez@ratepay.com", sendToIndividuals: true]) | ||
// } | ||
// } | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
beStrictAboutCoversAnnotation="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
verbose="true"> | ||
|
||
<testsuite name="default"> | ||
<directory suffix="Test.php">tests</directory> | ||
</testsuite> | ||
|
||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# must be unique in a given SonarQube instance | ||
sonar.projectKey=devmo-php-library | ||
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. | ||
sonar.projectName=DevMO PHP-Library | ||
sonar.projectVersion=0.9.4.3 | ||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
# This property is optional if sonar.modules is set. | ||
sonar.sources=. | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
sonar.sourceEncoding=UTF-8 | ||
|
||
sonar.exclusions=tests/**/*,vendor/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.