Skip to content
Snippets Groups Projects
Commit 878b05c3 authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[upd] update files

parent bb2a3d38
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,7 @@ pipeline {
agent any
steps {
echo "Phase 1 : checkout"
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://gitlab.imt-atlantique.fr/f21munie/project_jenkins_php.git']]])
}
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'e8eaded1-e9c8-4185-b828-0b89af4d1024', url: 'https://gitlab.imt-atlantique.fr/f21munie/project_jenkins_php.git']]]) }
}
stage('tests') {
......@@ -86,7 +85,7 @@ pipeline {
echo "Phase : Script de construction l'image numérotée"
echo "Phase : Script de publication de l'imagesur le registre privé"
script {
docker.withRegistry('https://gitlab.imt-atlantique.fr/f21munie/project_jenkins_php/container_registry') {
docker.withRegistry('gitlab-registry.imt-atlantique.fr/f21munie/project_jenkins_php') {
docker.build("checktva:${env.BUILD_ID}", "./src").push()
}
}
......
......@@ -14,6 +14,7 @@ failOnWarning="true">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
......@@ -30,3 +31,4 @@ failOnWarning="true">
<ini name="memory_limit" value="-1"/>
</php>
</phpunit>
<?php
require "code.php";
#use App\Entity;
if (! isset($argv[3])) {
exit("Usage: php ".basename(__FILE__)." <NAME> <TYPE> <PRICE>\n");
......@@ -7,6 +8,7 @@ if (! isset($argv[3])) {
try {
$product = new Product($argv[1], $argv[2], $argv[3]);
$product->computeTVA();
#\Product::computeTVA($argv[1], $argv[2], $argv[3]);
echo " OK TVA calculated\n";
} catch (\Exception | TypeError $e) {
echo " KO TVA not calculated ", $e->getMessage(),"\n";
......
<?php declare(strict_types=1);
namespace App\Entity;
#namespace App\Entity;
class Product
{
const FOOD_PRODUCT = 'food';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment