Skip to content
Snippets Groups Projects
Commit 62468b0a authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Module Dépôt du manuscrit : l'URL du web service de validation de fichier...

Module Dépôt du manuscrit : l'URL du web service de validation de fichier (https://facile.cines.fr/xml par défaut) est désormais paramétrable.
parent dc8032db
No related branches found
No related tags found
No related merge requests found
Pipeline #36482 passed
...@@ -15,6 +15,7 @@ on cachera le message orange pour les rôles suivants : ...@@ -15,6 +15,7 @@ on cachera le message orange pour les rôles suivants :
- Direction/Co-direction de thèse - Direction/Co-direction de thèse
- Responsable/Gestionnaire UR - Responsable/Gestionnaire UR
- Script de purge des fichiers/répertoires temporaires : inclusion de ceux générés par le module StepStar et datant de plus de 14j. - Script de purge des fichiers/répertoires temporaires : inclusion de ceux générés par le module StepStar et datant de plus de 14j.
- Module Dépôt du manuscrit : l'URL du web service de validation de fichier (https://facile.cines.fr/xml par défaut) est désormais paramétrable.
- [FIX] Page des comptes utilisateurs : erreur 'Type of Application\Controller\UtilisateurController::$shibService must be UnicaenAuthentification\Service\ShibService'. - [FIX] Page des comptes utilisateurs : erreur 'Type of Application\Controller\UtilisateurController::$shibService must be UnicaenAuthentification\Service\ShibService'.
- [FIX] Envoi vers STEP-STAR : pas de balise INE du tout dans le fichier TEF si l'INE du doctorant est vide. - [FIX] Envoi vers STEP-STAR : pas de balise INE du tout dans le fichier TEF si l'INE du doctorant est vide.
- [FIX] Envoi vers STEP-STAR : retour au même 'Content ID' qu'aux 1er envois (utilisation de doctorant.individu.supannId) car c'est l'identifiant unique STEP-STAR et il doit être immuable. - [FIX] Envoi vers STEP-STAR : retour au même 'Content ID' qu'aux 1er envois (utilisation de doctorant.individu.supannId) car c'est l'identifiant unique STEP-STAR et il doit être immuable.
......
# Sonde nagios / shinken pour FACILE # Sonde nagios / shinken pour FACILE
Mail d'Alexandre GRANIER (granier@cines.fr) du 16/12/2016 : Mail du CINES ranier@cines.fr) du 16/12/2016 :
Bonjour, Bonjour,
...@@ -31,5 +31,4 @@ Mail d'Alexandre GRANIER (granier@cines.fr) du 16/12/2016 : ...@@ -31,5 +31,4 @@ Mail d'Alexandre GRANIER (granier@cines.fr) du 16/12/2016 :
CINES, Centre Informatique National de l’Enseignement Supérieur CINES, Centre Informatique National de l’Enseignement Supérieur
950, rue de Saint Priest 950, rue de Saint Priest
34097 MONTPELLIER cedex 5 34097 MONTPELLIER cedex 5
Tél. : 04 67 14 14 73
...@@ -40,10 +40,17 @@ $config = [ ...@@ -40,10 +40,17 @@ $config = [
'css_file_path' => APPLICATION_DIR . '/module/Depot/view/depot/depot/page-de-couverture/pagedecouverture.css', 'css_file_path' => APPLICATION_DIR . '/module/Depot/view/depot/depot/page-de-couverture/pagedecouverture.css',
], ],
], ],
// Options pour le test d'archivabilité //
// Options pour le test d'archivabilité du manuscrit de thèse (fait appel au web service "Facile" du CINES).
//
'archivabilite' => [ 'archivabilite' => [
// URL du web service "Facile" du CINES
'ws_url' => 'https://facile.cines.fr/xml',
// emplacement du script bash testant la réponse du ws
'check_ws_script_path' => __DIR__ . '/../../bin/from_cines/check_webservice_response.sh', 'check_ws_script_path' => __DIR__ . '/../../bin/from_cines/check_webservice_response.sh',
// emplacement du script bash réalisant l'appel du ws
'script_path' => __DIR__ . '/../../bin/validation_cines.sh', 'script_path' => __DIR__ . '/../../bin/validation_cines.sh',
// activation et config du proxy éventuel
'proxy' => [ 'proxy' => [
'enabled' => false, 'enabled' => false,
//'proxy_host' => 'http://proxy.unicaen.fr', //'proxy_host' => 'http://proxy.unicaen.fr',
......
...@@ -19,10 +19,16 @@ return [ ...@@ -19,10 +19,16 @@ return [
'css_file_path' => APPLICATION_DIR . '/module/Depot/view/depot/depot/page-de-couverture/pagedecouverture.css', 'css_file_path' => APPLICATION_DIR . '/module/Depot/view/depot/depot/page-de-couverture/pagedecouverture.css',
], ],
], ],
//
// Options pour le test d'archivabilité du manuscrit de thèse (fait appel au web service "Facile" du CINES).
//
'archivabilite' => [ 'archivabilite' => [
// URL du web service "Facile" du CINES
'ws_url' => 'https://facile.cines.fr/xml',
// activation et config du proxy éventuel
'proxy' => [ 'proxy' => [
'enabled' => true, 'enabled' => true,
'proxy_host' => 'http://proxy.unicaen.fr', 'proxy_host' => 'http://proxy.domain.fr',
'proxy_port' => 3128, 'proxy_port' => 3128,
], ],
], ],
......
...@@ -11,17 +11,11 @@ class TestArchivabiliteShellCommand extends ShellCommand ...@@ -11,17 +11,11 @@ class TestArchivabiliteShellCommand extends ShellCommand
/** /**
* @var string Chemin absolu du script à exécuter. * @var string Chemin absolu du script à exécuter.
*/ */
protected $scriptPath; protected string $scriptPath;
/** protected ?string $url = null;
* @var string
*/
protected $url;
/** protected ?int $maxExecutionTime = null;
* @var int
*/
protected $maxExecutionTime;
/** /**
* @var array * @var array
...@@ -37,41 +31,30 @@ class TestArchivabiliteShellCommand extends ShellCommand ...@@ -37,41 +31,30 @@ class TestArchivabiliteShellCommand extends ShellCommand
} }
/** /**
* ValidationFichierCinesCommand constructor. * Constructeur.
* *
* @param null $scriptPath Chemin absolu du script à exécuter. * @param string $scriptPath Chemin absolu du script à exécuter.
* @param array $options * @param array $options
*/ */
public function __construct($scriptPath = null, array $options = []) public function __construct(string $scriptPath, array $options = [])
{ {
$this->scriptPath = $scriptPath; $this->scriptPath = $scriptPath;
$this->options = $options; $this->options = $options;
} }
/**
* @param string $url
* @return self
*/
public function setUrl(string $url): self public function setUrl(string $url): self
{ {
$this->url = $url; $this->url = $url;
return $this; return $this;
} }
/** public function setMaxExecutionTime(?int $maxExecutionTime): self
* @param int|null $maxExecutionTime
* @return self
*/
public function setMaxExecutionTime(int $maxExecutionTime = null): self
{ {
$this->maxExecutionTime = $maxExecutionTime; $this->maxExecutionTime = $maxExecutionTime;
return $this; return $this;
} }
/** public function generateCommandLine(): void
* @inheritDoc
*/
public function generateCommandLine()
{ {
$command = sprintf('%s %s --file "%s" %s %s', $command = sprintf('%s %s --file "%s" %s %s',
$this->generateEnvVarsString(), $this->generateEnvVarsString(),
...@@ -105,11 +88,6 @@ class TestArchivabiliteShellCommand extends ShellCommand ...@@ -105,11 +88,6 @@ class TestArchivabiliteShellCommand extends ShellCommand
return implode(' ', $envVars); return implode(' ', $envVars);
} }
/**
* @param array $output
* @param int $returnCode
* @return \Fichier\Command\TestArchivabiliteShellCommandResult
*/
public function createResult(array $output, int $returnCode): ShellCommandResult public function createResult(array $output, int $returnCode): ShellCommandResult
{ {
return new TestArchivabiliteShellCommandResult($output, $returnCode); return new TestArchivabiliteShellCommandResult($output, $returnCode);
......
...@@ -7,6 +7,10 @@ use Webmozart\Assert\Assert; ...@@ -7,6 +7,10 @@ use Webmozart\Assert\Assert;
class TestArchivabiliteShellCommandFactory class TestArchivabiliteShellCommandFactory
{ {
/**
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function __invoke(ContainerInterface $container): TestArchivabiliteShellCommand public function __invoke(ContainerInterface $container): TestArchivabiliteShellCommand
{ {
$config = $container->get('config'); $config = $container->get('config');
...@@ -18,6 +22,14 @@ class TestArchivabiliteShellCommandFactory ...@@ -18,6 +22,14 @@ class TestArchivabiliteShellCommandFactory
Assert::keyExists($options, 'script_path', "La clé %s est introuvable dans la config 'archivabilite'"); Assert::keyExists($options, 'script_path', "La clé %s est introuvable dans la config 'archivabilite'");
$scriptPath = $config['sygal']['archivabilite']['script_path']; $scriptPath = $config['sygal']['archivabilite']['script_path'];
return new TestArchivabiliteShellCommand($scriptPath, $options); $wsUrl = $options['ws_url'] ?? null;
$command = new TestArchivabiliteShellCommand($scriptPath, $options);
if ($wsUrl !== null) {
$command->setUrl($wsUrl);
}
return $command;
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment