Skip to content

Commit

Permalink
Feat/449 SEI3 com Oracle e SqlServer (#452)
Browse files Browse the repository at this point in the history
* Ajustes para o ecossistema SEI3
* Ecossistema agora nos mesmos moldes do sei4
* Ecossistema agora suporta Oracle e Sqlserver
  • Loading branch information
marlinhares authored Mar 18, 2024
1 parent bce54e1 commit e61e27b
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 184 deletions.
22 changes: 13 additions & 9 deletions jenkins/01-Teste-Unico-ou-Grupo.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ pipeline {
buildDescription s

sh """
docker volume prune -f
ifconfig || true
if [ -f ${FOLDERMODULO}/Makefile ]; then
make destroy || true
Expand Down Expand Up @@ -245,7 +246,7 @@ pipeline {
rm -rf sei sip infra
mv src/sei src/sip src/infra .
fi
"""

}
Expand Down Expand Up @@ -314,11 +315,6 @@ pipeline {
sudo rm -rf ${FOLDERSPE}/sei/scripts/mod-pen
sudo rm -rf ${FOLDERSPE}/sei/config/ConfiguracaoSEI.php*
sudo rm -rf ${FOLDERSPE}/sip/config/ConfiguracaoSip.php*
if [ "${SISTEMA}" = "sei3" ]; then
cp ${FOLDER_FUNCIONAIS}/assets/config/ConfiguracaoSEI.php ${FOLDERSPE}/sei/config/ConfiguracaoSEI.php~
cp ${FOLDER_FUNCIONAIS}/assets/config/ConfiguracaoSip.php ${FOLDERSPE}/sip/config/ConfiguracaoSip.php~
fi
""", label: "Destroi ambiente e Remove Antigos"

Expand All @@ -338,7 +334,7 @@ pipeline {
sed -i "s|sistema=.*|sistema=${SISTEMA}|g" Makefile
sed -i "s|PARALLEL_TEST_NODES =.*|PARALLEL_TEST_NODES = ${TESTE_PARALLEL}|g" Makefile
sed -i "s|^base=.*|base=${DATABASE}|g" Makefile
make config
sed -i "s|SEI_PATH=.*|SEI_PATH=${FOLDERSPE}|g" ${FOLDER_FUNCIONAIS}/.env
sed -i "s|ORG1_CERTIFICADO_SENHA=.*|ORG1_CERTIFICADO_SENHA=$ORG1_CERT_PASS|g" ${FOLDER_FUNCIONAIS}/.env
Expand Down Expand Up @@ -384,12 +380,17 @@ pipeline {
sed -i "/INFORME O ID DE ESTRUTURA UTILIZADO PARA TESTE ORG 1.1/d" ${FOLDER_FUNCIONAIS}/phpunit.xml
sed -i "/INFORME O ID DE ESTRUTURA UTILIZADO PARA TESTE ORG2/d" ${FOLDER_FUNCIONAIS}/phpunit.xml
sed -i "/INFORME O NOME DA ESTRUTURA UTILIZADO PARA TESTE ORG2/d" ${FOLDER_FUNCIONAIS}/phpunit.xml
cp ${FOLDER_FUNCIONAIS}/phpunit.xml phpunitoriginal.xml
make destroy
make up
if [ "$DATABASE" = "oracle" ] || [ "$DATABASE" = "sqlserver" ]; then
sleep 30
fi
make check-isalive
set +e
echo ""
Expand Down Expand Up @@ -455,7 +456,7 @@ pipeline {
steps{
dir("${FOLDERMODULO}"){
sh script: """
if [ "${SISTEMA}" = "sei3" ]; then
make test-unit || true
else
Expand Down Expand Up @@ -592,6 +593,9 @@ pipeline {
done
#docker system prune -a -f
docker volume prune -f
if [ -f "rodarnovamente.txt" ]; then
exit 1
Expand Down
155 changes: 79 additions & 76 deletions tests_sei3/funcional/assets/config/ConfiguracaoSEI.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,94 +13,97 @@ public static function getInstance(){

public function getArrConfiguracoes(){
return array(

'SEI' => array(
'URL' => getenv('SEI_HOST_URL').'/sei',
'URL' => getenv('HOST_URL').'/sei',
'Producao' => false,
'RepositorioArquivos' => '/var/sei/arquivos',
'Modulos' => array(
"PENIntegracao" => "pen",
)

'DigitosDocumento' => 7,
'NumLoginUsuarioExternoSemCaptcha' => 3,
'TamSenhaUsuarioExterno' => 8,
'DebugWebServices' => 2,
'MaxMemoriaPdfGb' => 4,
'Modulos' => array(
"PENIntegracao" => "pen",
)
),

'SessaoSEI' => array(
'SiglaOrgaoSistema' => 'ABC',
'SiglaSistema' => 'SEI',
'PaginaLogin' => getenv('HOST_URL') . '/sip/login.php',
'SipWsdl' => getenv('HOST_URL') . '/sip/controlador_ws.php?servico=wsdl',
'https' => false
),

'PaginaSEI' => array(
'NomeSistema' => 'SEI',
'NomeSistemaComplemento' => SEI_VERSAO,
'LogoMenu' => ''),

'SessaoSEI' => array(
'SiglaOrgaoSistema' => 'ABC',
'SiglaSistema' => 'SEI',
'PaginaLogin' => getenv('SEI_HOST_URL').'/sip/login.php',
'SipWsdl' => 'http://localhost/sip/controlador_ws.php?servico=wsdl',
'https' => false
),

'BancoSEI' => array(
'Servidor' => 'mysql',
'Porta' => '3306',
'Banco' => 'sei',
'Usuario' => 'sei_user',
'Senha' => 'sei_user',
'UsuarioScript' => 'sei_user',
'SenhaScript' => 'sei_user',
'Tipo' => 'MySql'),

// 'BancoSEI' => array(
// 'Servidor' => 'oracle',
// 'Porta' => '1521',
// 'Banco' => 'sei',
// 'Usuario' => 'sei',
// 'Senha' => 'sei_user',
// 'UsuarioScript' => 'sei',
// 'SenhaScript' => 'sei_user',
// 'Tipo' => 'Oracle'), //MySql, SqlServer ou Oracle

// 'BancoSEI' => array(
// 'Servidor' => 'sqlserver',
// 'Porta' => '1433',
// 'Banco' => 'sei',
// 'Usuario' => 'sei_user',
// 'Senha' => 'sei_user',
// 'UsuarioScript' => 'sei_user',
// 'SenhaScript' => 'sei_user',
// 'Tipo' => 'SqlServer'), //MySql, SqlServer ou Oracle

'CacheSEI' => array('Servidor' => 'memcached',
'Porta' => '11211'),
'LogoMenu' => '',
'OrgaoTopoJanela' => 'S',
),

'JODConverter' => array('Servidor' => 'http://jod:8080/converter/service'),
'BancoSEI' => array(
'Servidor' => getenv('DATABASE_HOST'),
'Porta' => getenv('DATABASE_PORT'),
'Banco' => getenv('SEI_DATABASE_NAME'),
'Usuario' => getenv('SEI_DATABASE_USER'),
'Senha' => getenv('SEI_DATABASE_PASSWORD'),
'UsuarioScript' => getenv('SEI_DATABASE_USER_SCRIPT'),
'SenhaScript' => getenv('SEI_DATABASE_PASSWORD_SCRIPT'),
'Tipo' => getenv('DATABASE_TYPE'), //MySql, SqlServer ou Oracle
'PesquisaCaseInsensitive' => false,
),

'Edoc' => array('Servidor' => 'http://[Servidor .NET]'),
'BancoAuditoriaSEI' => array(
'Servidor' => 'mysql',
'Porta' => '3306',
'Banco' => 'sei',
'Usuario' => 'sei_user',
'Senha' => 'sei_user',
'Tipo' => 'MySql', //MySql, SqlServer ou Oracle
),

'Solr' => array(
'Servidor' => 'http://solr:8983/solr',
'CoreProtocolos' => 'sei-protocolos',
'CoreBasesConhecimento' => 'sei-bases-conhecimento',
'CorePublicacoes' => 'sei-publicacoes'),
'CacheSEI' => array(
'Servidor' => 'memcached',
'Porta' => '11211',
'Timeout' => 2,
'Tempo' => 3600,
),

'HostWebService' => array(
'Edoc' => array('[Servidor .NET]'),
'Sip' => array('*'), //Referências (IP e nome na rede) de todas as máquinas que executam o SIP.
'Publicacao' => array('*'), //Referências (IP e nome na rede) das máquinas de veículos de publicação externos cadastrados no SEI.
'Ouvidoria' => array('*'), //Referências (IP e nome na rede) da máquina que hospeda o formulário de Ouvidoria personalizado. Se utilizar o formulário padrão do SEI, então configurar com as máquinas dos nós de aplicação do SEI.
),
'Solr' => array(
'Servidor' => 'http://solr:8983/solr',
'CoreProtocolos' => 'sei-protocolos',
'CoreBasesConhecimento' => 'sei-bases-conhecimento',
'CorePublicacoes' => 'sei-publicacoes',
'TempoCommitProtocolos' => 300,
'TempoCommitBasesConhecimento' => 60,
'TempoCommitPublicacoes' => 60,
),

'InfraMail' => array(
'Tipo' => '2', //1 = sendmail (neste caso não é necessário configurar os atributos abaixo), 2 = SMTP
'Servidor' => 'smtp',
'Porta' => '1025',
'Codificacao' => '8bit', //8bit, 7bit, binary, base64, quoted-printable
'MaxDestinatarios' => 999, //numero maximo de destinatarios por mensagem
'MaxTamAnexosMb' => 999, //tamanho maximo dos anexos em Mb por mensagem
'Seguranca' => '', //TLS, SSL ou vazio
'Autenticar' => false, //se true então informar Usuario e Senha
'Usuario' => '',
'Senha' => '',
'Protegido' => '[email protected]' //campo usado em desenvolvimento, se tiver um email preenchido entao todos os emails enviados terao o destinatario ignorado e substituído por este valor (evita envio incorreto de email)
)
);
}
}
'JODConverter' => array(
'Servidor' => 'http://jod/converter/service'
),

'HostWebService' => array(
'Sip' => array('*'),
'Publicacao' => array('*'),
'Ouvidoria' => array('*'),
),

'InfraMail' => array(
'Tipo' => '2',
'Servidor' => 'smtp',
'Porta' => '1025',
'Codificacao' => '8bit',
'MaxDestinatarios' => 999,
'MaxTamAnexosMb' => 999,
'Autenticar' => false,
'Usuario' => '',
'Senha' => '',
'Seguranca' => '', //TLS, SSL ou vazio
'Protegido' => '[email protected]',
),
);
}
}
Loading

0 comments on commit e61e27b

Please sign in to comment.