Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Agiliza
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evologica
Agiliza
Commits
e7d1ab1c
Commit
e7d1ab1c
authored
Sep 08, 2021
by
Rafael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Altera arquivo de CI.
parent
515acaff
Pipeline
#7947
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
266 additions
and
663 deletions
+266
-663
.gitlab-ci.yml
.gitlab-ci.yml
+266
-663
No files found.
.gitlab-ci.yml
View file @
e7d1ab1c
variables
:
BUILD_ENVIROMENT_DIR
:
$CI_BUILDS_DIR\ambiente-de-build
BUILD_ENVIROMENT_CONFIG_FILE_PATH
:
$CI_BUILDS_DIR\ambiente-de-build\GerarPacoteEnvio.config
BUILD_FRAMEWORK_DCUS_DIR
:
$CI_BUILDS_DIR\ambiente-de-build\curio\v1_8_6_12
CURIO_VERSION
:
'
1.8.6.12'
CI_COMMIT_MESSAGE
:
'
$CI_COMMIT_MESSAGE'
ARTIFACT_NAME
:
'
SGS_${CI_COMMIT_TAG}'
PROJECT_ID
:
'
idexa%2FSGS'
PROJECT_TOKEN
:
'
3CQevZshNAKWPckKBYNS'
OID_CLIENTE_SISCON
:
'
40'
CONFIG_XML_PATH
:
Comum\bin\sgs.xml
stages
:
stages
:
-
prebuild
-
prebuildtest
-
buildweb
-
build
-
build
-
test
-
delivery
-
deploy_internally
-
deploy
-
deploy
-
badge
-
badge
s
.only_build
:
&only_build
variables
:
stage
:
build
LC_ALL
:
'
en_US.UTF-8'
tags
:
LANG
:
'
en_US.UTF-8'
-
delphi
variables
:
.has_no_tags
:
&has_no_tags
GIT_STRATEGY
:
fetch
only
:
only
:
-
branches
-
branches
except
:
except
:
-
tags
-
tags
-
develop
.build_and_distribute
:
&build_and_distribute
.version
:
&version
stage
:
build
tags
:
-
delphi
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /.*[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/
except
:
variables
:
-
$CI_COMMIT_TAG =~ /autopop/
update_ambiente_build
:
stage
:
prebuild
tags
:
-
delphi
when
:
manual
tags
:
-
delphi
variables
:
GIT_STRATEGY
:
none
script
:
-
git reset --hard
-
git -C ${BUILD_ENVIROMENT_DIR} reset --hard
-
git -C ${BUILD_ENVIROMENT_DIR} pull
except
:
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev/
-
$CI_COMMIT_TAG =~ /autopop\/homolog/
-
$CI_COMMIT_TAG =~ /autopop\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
update_scriptBuild_CurioBuild
:
stage
:
prebuild
tags
:
-
delphi
when
:
manual
tags
:
-
delphi
variables
:
GIT_STRATEGY
:
none
script
:
-
pip install --upgrade CurioBuild
except
:
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev/
-
$CI_COMMIT_TAG =~ /autopop\/homolog/
-
$CI_COMMIT_TAG =~ /autopop\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
update_local_tags
:
stage
:
prebuild
tags
:
-
delphi
when
:
manual
variables
:
GIT_STRATEGY
:
none
script
:
-
git tag -d $(git tag -l)
-
git fetch
except
:
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev/
-
$CI_COMMIT_TAG =~ /autopop\/homolog/
-
$CI_COMMIT_TAG =~ /autopop\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.autopop_cli
:
&autopop_cli
before_script
:
before_script
:
# Version
# Version
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
4
)`
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
2
)`
-
echo $Version
-
echo $Version
-
MajorVersion=`echo "$Version" | (cut -d'.' -f 1 )`.`echo "$Version" | (cut -d'.' -f 2 )`
-
echo $MajorVersion
-
BuildNumber=`echo "$Version" | (cut -d'.' -f 3 )`
-
echo $BuildNumber
-
TagMessage=`git tag -l $CI_COMMIT_TAG --format='%(subject)'`
-
echo $TagMessage
# Set Version
-
json -I -f AutoPop/cli/web/corretor/package.json -e "this.version='$Version'"
# Set Registry
-
yarn config set registry https://nexus.dev.evologica.com.br/repository/npm/
.autopop_cli_pacote
:
&autopop_cli_pacote
.web
:
&web
tags
:
-
web
before_script
:
before_script
:
# Version
# Version
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
2
)`
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
3
)`
-
echo $Version
-
echo $Version
-
MajorVersion=`echo "$Version" | (cut -d'.' -f 1 )`.`echo "$Version" | (cut -d'.' -f 2 )`
-
VersionCode=`echo "$Version" | (cut -d'.' -f 1 )``echo "$Version" | (cut -d'.' -f 2 )``echo "$Version" | (cut -d'.' -f 3 )`
-
echo $MajorVersion
-
echo $VersionCode
-
BuildNumber=`echo "$Version" | (cut -d'.' -f 3 )`
-
echo $BuildNumber
-
TagMessage=`git tag -l $CI_COMMIT_TAG --format='%(subject)'`
-
echo $TagMessage
# Set Version
-
json -I -f AutoPop/cli/web/corretor/package.json -e "this.version='$Version'"
# Set Registry
-
yarn config set registry https://nexus.dev.evologica.com.br/repository/npm/
#-----------------------------------------------------------------------------------#
#################################################################################################
#-----------------------------IDENTIFICAÇÃO DE TAGS---------------------------------#
# TAG IDENTIFICATION #
#-----------------------------------------------------------------------------------#
#################################################################################################
.has_tag_autopop_cli_pacote
:
&has_tag_autopop_cli_pacote
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_cliente_web
:
&has_tag_cliente_web
.has_tag_autopop_srv
:
&has_tag_autopop_srv
stage
:
deploy
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/srv\/(\w+(,\w+)*\/)?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_autopop_dev_cli_banseg
:
&has_tag_autopop_dev_cli_banseg
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev\/banseg\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_autopop_dev_cli_banescor
:
&has_tag_autopop_dev_cli_banescor
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev\/banescor\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_autopop_dev_cli_corretor
:
&has_tag_autopop_dev_cli_corretor
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev\/corretor\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_autopop_dev_cli_segcor
:
&has_tag_autopop_dev_cli_segcor
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev\/seguradoCorretor\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_autopop_dev_cli_segurado
:
&has_tag_autopop_dev_cli_segurado
only
:
refs
:
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev\/segurado\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
.has_tag_autopop_homolog_cli_banseg
:
&has_tag_autopop_homolog_cli_banseg
only
:
only
:
refs
:
refs
:
-
tags
-
tags
variables
:
variables
:
-
$CI_COMMIT_TAG =~ /
autopop\/homolog\/banseg\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\
.[0-9]{1,3}/
-
$CI_COMMIT_TAG =~ /
AppCliente[/]web[/][0-9]{1,3}.[0-9]{1,3}
.[0-9]{1,3}/
.has_tag_autopop_homolog_cli_banescor
:
&has_tag_autopop_homolog_cli_banescor
.has_tag_agente_web
:
&has_tag_agente_web
stage
:
deploy
only
:
only
:
refs
:
refs
:
-
tags
-
tags
variables
:
variables
:
-
$CI_COMMIT_TAG =~ /
autopop\/homolog\/banescor\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
-
$CI_COMMIT_TAG =~ /
AppAgente[/]web[/][0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/
.has_tag_autopop_homolog_cli_corretor
:
&has_tag_autopop_homolog_cli_corretor
.has_tag_api_internal
:
&has_tag_api_internal
stage
:
deploy
only
:
only
:
refs
:
refs
:
-
tags
-
tags
variables
:
variables
:
-
$CI_COMMIT_TAG =~ /a
utopop\/homolog\/corretor\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
-
$CI_COMMIT_TAG =~ /a
pi[/][0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/
.has_tag_autopop_homolog_cli_segcor
:
&has_tag_autopop_homolog_cli_segcor
.has_tag_server
:
&has_tag_server
stage
:
deploy
only
:
only
:
refs
:
refs
:
-
tags
-
tags
variables
:
variables
:
-
$CI_COMMIT_TAG =~ /
autopop\/homolog\/seguradoCorretor\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
-
$CI_COMMIT_TAG =~ /
srv[/][0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/
.has_tag_autopop_homolog_cli_segurado
:
&has_tag_autopop_homolog_cli_segurado
#################################################################################################
only
:
# Android APP BUILD #
refs
:
#################################################################################################
-
tags
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/homolog\/segurado\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
#-----------------------------------------------------------------------------------#
.build_app_cliente_web
:
&build_app_cliente_web
#-----------------------GERAR CONFIGURAÇÃO SISTEMA DO SISCON------------------------#
#-----------------------------------------------------------------------------------#
.config_xml
:
&config_xml
only
:
-
branches
-
tags
except
:
variables
:
-
$CI_COMMIT_TAG =~ /autopop\/dev/
-
$CI_COMMIT_TAG =~ /autopop\/homolog/
-
$CI_COMMIT_TAG =~ /autopop\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/
tags
:
-
delphi
generate_config_xml
:
<<
:
*config_xml
stage
:
prebuild
variables
:
GIT_STRATEGY
:
none
before_script
:
before_script
:
-
New-Item -ItemType Directory -Force -Path Comum
-
cd cli/web/cliente
-
New-Item -ItemType Directory -Force -Path Comum\bin
script
:
-
python ${BUILD_ENVIROMENT_DIR}\scriptsCI\generate_system_xml_config.py ${BUILD_ENVIROMENT_DIR} $OID_CLIENTE_SISCON $CI_COMMIT_REF_NAME $CONFIG_XML_PATH
artifacts
:
# expose_as: 'servico' # Not avaliable until gitlab version 12.5
name
:
sgs.xml
expire_in
:
5 hours
paths
:
-
Comum\bin\sgs.xml
test_config_xml
:
<<
:
*config_xml
stage
:
prebuildtest
variables
:
EXE
:
$CI_BUILDS_DIR\ambiente-de-build\bin\VerificadorMenu.exe
dependencies
:
-
generate_config_xml
script
:
-
verificadorMsg $CONFIG_XML_PATH .
-
echo "$EXE -XML $CONFIG_XML_PATH -DIR . -R .\BaseDetran\"
-
Invoke-Expression "$EXE -XML $CONFIG_XML_PATH -DIR . -R .\BaseDetran\"
after_script
:
-
cat .\LogMsgErroNaoCadastradas.txt
.web
:
&web
tags
:
-
autopop
script
:
-
yarn --version
-
node -v
-
rm -rf _pacote_web
-
mkdir _pacote_web
-
cd AutoPop/cli/web/corretor
-
json -I -f package.json -e "this.version='$Version'"
-
yarn
-
yarn
# Buildar segurado
-
yarn build
-
yarn build:segurado:homologBanestes
-
rm -f dist/cotacao/config.json
-
mv dist/cotacao ../../../../_pacote_web/cotacao
# Buildar banescor
-
yarn build:banescor:homologBanestes
-
rm -f dist/banescor/config.json
-
mv dist/banescor ../../../../_pacote_web/banescor
# Buildar banseg
-
yarn build:banseg:homologBanestes
-
rm -f dist/banseg/config.json
-
mv dist/banseg ../../../../_pacote_web/banseg
# Buildar corretor
-
yarn build:corretor:homologBanestes
-
rm -f dist/corretor/config.json
-
mv dist/corretor ../../../../_pacote_web/corretor
# Buildar segurado corretor
-
yarn build:segcor:homologBanestes
-
rm -f dist/segcor/config.json
-
mv dist/segcor ../../../../_pacote_web/segcor
-
rm -rf node_modules/*
#-----------------------------------------------------------------------------------#
#---------------------------------------BUILD---------------------------------------#
#-----------------------------------------------------------------------------------#
build_server
:
<<
:
*only_build
dependencies
:
-
generate_config_xml
before_script
:
-
md server
script
:
-
dir C:\GitLabRunner\builds\ambiente-de-build\curio\v1_8_6_12\srv\
-
python .\build\GerarPacote.py build_servico --project_root_directory="." --output_directory="server" --build_directory="$BUILD_ENVIROMENT_DIR" --build_config_path="$BUILD_ENVIROMENT_CONFIG_FILE_PATH" --dcus_curio_directory="$BUILD_FRAMEWORK_DCUS_DIR" --skip_pause_between_steps --skip_msg_verification --skip_menu_verification -sql=auto --debug
build_client
:
<<
:
*only_build
before_script
:
-
md client
script
:
-
python .\build\GerarPacote.py build_cliente --project_root_directory="." --output_directory="client" --build_directory="$BUILD_ENVIROMENT_DIR" --build_config_path="$BUILD_ENVIROMENT_CONFIG_FILE_PATH" --dcus_curio_directory="$BUILD_FRAMEWORK_DCUS_DIR" --skip_pause_between_steps --debug
build_web
:
<<
:
*only_build
<<
:
*web
stage
:
build
when
:
manual
after_script
:
-
echo "fim"
build_all
:
<<
:
*build_and_distribute
before_script
:
-
md _pacote_destino
dependencies
:
-
generate_config_xml
script
:
-
$TAG_MESSAGE=(git tag -l $CI_COMMIT_TAG --format='%(subject)')
-
echo $TAG_MESSAGE
-
python .\build\GerarPacote.py build_all --project_root_directory="." --output_directory="_pacote_destino" --build_directory="$BUILD_ENVIROMENT_DIR" --build_config_path="$BUILD_ENVIROMENT_CONFIG_FILE_PATH" --dcus_curio_directory="$BUILD_FRAMEWORK_DCUS_DIR" --skip_pause_between_steps --skip_msg_verification --skip_menu_verification -sql=auto --release_notes=$TAG_MESSAGE --tag_text=$env:CI_COMMIT_TAG --debug
artifacts
:
artifacts
:
# expose_as: 'servico' # Not avaliable until gitlab version 12.5
name
:
dist
name
:
$ARTIFACT_NAME
expire_in
:
1 week
paths
:
paths
:
-
_pacote_destino
-
cli/web/cliente/dist
expire_in
:
2 weeks
#-----------------------------------------------------------------------------------#
#-----------------------------------DEPLOY AutoPop----------------------------------#
#-----------------------------------------------------------------------------------#
build_autopop_web
:
<<
:
*has_tag_autopop_cli_pacote
<<
:
*web
<<
:
*autopop_cli_pacote
stage
:
buildweb
artifacts
:
# expose_as: 'servico' # Not avaliable until gitlab version 12.5
name
:
$ARTIFACT_NAME
expire_in
:
1 week
paths
:
-
_pacote_web
build_autopop_srv
:
<<
:
*has_tag_autopop_srv
stage
:
build
tags
:
-
delphi
before_script
:
-
md _pacote_destino
dependencies
:
-
generate_config_xml
script
:
-
$TAG_MESSAGE=(git tag -l $CI_COMMIT_TAG --format='%(subject)')
-
echo $TAG_MESSAGE
-
python .\build\GerarPacoteAutopop.py build --project_root_directory="." --output_directory="_pacote_destino" --build_directory="$BUILD_ENVIROMENT_DIR" --build_config_path="$BUILD_ENVIROMENT_CONFIG_FILE_PATH" --dcus_curio_directory="$BUILD_FRAMEWORK_DCUS_DIR" --skip_pause_between_steps --skip_msg_verification --skip_menu_verification -sql=auto --release_notes="Atualização Autopop" --tag_text=$env:CI_COMMIT_TAG --debug
artifacts
:
# expose_as: 'servico' # Not avaliable until gitlab version 12.5
name
:
$ARTIFACT_NAME
expire_in
:
1 week
paths
:
-
_pacote_destino
build_autopop_dev_cli_corretor
:
<<
:
*has_tag_autopop_dev_cli_corretor
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:corretor:staging
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopCorretor/
after_script
:
-
rm node_modules
-
rm dist
build_autopop_dev_cli_banseg
:
<<
:
*has_tag_autopop_dev_cli_banseg
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:banseg:staging
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopop_dev/
after_script
:
-
rm node_modules
-
rm dist
build_autopop_dev_cli_banescor
:
<<
:
*has_tag_autopop_dev_cli_banescor
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:banescor:staging
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopBanescor/
after_script
:
-
rm node_modules
-
rm dist
build_autopop_dev_cli_segcor
:
<<
:
*has_tag_autopop_dev_cli_segcor
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:segcor:staging
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopCliente/corretor
after_script
:
-
rm node_modules
-
rm dist
build_autopop_dev_cli_segurado
:
<<
:
*has_tag_autopop_dev_cli_segurado
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:segurado:staging
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopCliente/segurado
after_script
:
-
rm node_modules
-
rm dist
build_autopop_homolog_cli_corretor
:
<<
:
*has_tag_autopop_homolog_cli_corretor
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:corretor:homolog
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopHomolog/corretor/
after_script
:
after_script
:
-
rm node_modules
-
rm node_modules
-
rm dist
-
rm dist
build_autopop_homolog_cli_banseg
:
<<
:
*has_tag_autopop_homolog_cli_banseg
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:banseg:homolog
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopHomolog/banseg/
after_script
:
-
rm node_modules
-
rm dist
build_autopop_homolog_cli_banescor
:
deploy_app_cliente_web
:
<<
:
*has_tag_autopop_homolog_cli_banescor
<<
:
*has_tag_cliente_web
<<
:
*autopop_cli
<<
:
*web
stage
:
build
<<
:
*build_app_cliente_web
tags
:
script
:
-
autopop
-
cp -R cli/web/cliente/dist ~/services/agiliza/cliente
script
:
artifacts
:
# Build
name
:
dist
-
cd AutoPop/cli/web/corretor/
paths
:
-
yarn
-
cli/web/cliente/dist
-
yarn build:banescor:homolog
expire_in
:
2 weeks
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopHomolog/banescor/
after_script
:
after_script
:
-
rm node_modules
-
rm node_modules
-
rm dist
-
rm dist
build_autopop_homolog_cli_segcor
:
.build_app_agente_web
:
&build_app_agente_web
<<
:
*has_tag_autopop_homolog_cli_segcor
before_script
:
<<
:
*autopop_cli
-
cd cli/web/agente
stage
:
build
-
yarn
tags
:
-
yarn build
-
autopop
artifacts
:
script
:
name
:
dist
# Build
paths
:
-
cd AutoPop/cli/web/corretor/
-
cli/web/agente/dist
-
yarn
expire_in
:
2 weeks
-
yarn build:segcor:homolog
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopClienteHomolog/corretor
after_script
:
after_script
:
-
rm node_modules
-
rm node_modules
-
rm dist
-
rm dist
build_autopop_homolog_cli_segurado
:
deploy_app_cliente_web
:
<<
:
*has_tag_autopop_homolog_cli_segurado
<<
:
*web
<<
:
*autopop_cli
<<
:
*has_tag_agente_web
stage
:
build
<<
:
*build_app_agente_web
tags
:
script
:
-
autopop
-
cp -R cli/web/cliente/dist ~/services/agiliza/cliente
script
:
artifacts
:
# Build
name
:
dist
-
cd AutoPop/cli/web/corretor/
paths
:
-
yarn
-
cli/web/cliente/dist
-
yarn build:segurado:homolog
expire_in
:
2 weeks
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopClienteHomolog/segurado
after_script
:
after_script
:
-
rm node_modules
-
rm node_modules
-
rm dist
-
rm dist
#################################################################################################
#-----------------------------------------------------------------------------------#
# SERVER BUILD #
#---------------------------------------DEPLOY--------------------------------------#
#################################################################################################
#-----------------------------------------------------------------------------------#
# .server_build_i: &server_build_i
copy_package_to_server
:
# tags:
<<
:
*build_and_distribute
# - rhel7
stage
:
deploy_internally
# variables:
variables
:
# SRV_DIR: srv/src/microcredito/
GIT_STRATEGY
:
none
# DOCKER_REGISTRY: dockerhub.dev.evologica.com.br
PATH_DEPLOY
:
\\srp1vp1\Publico\Pacotes\SGS
# script:
FILE_NAME_DEPLOY
:
${CI_COMMIT_TAG}
# - cd $SRV_DIR
dependencies
:
# - chmod +x gradlew
-
build_all
# - ./gradlew spotlessJavaApply
script
:
# - ./gradlew assemble
-
python ${BUILD_ENVIROMENT_DIR}\scriptsCI\compress_file.py ${BUILD_ENVIROMENT_CONFIG_FILE_PATH} _pacote_destino $PATH_DEPLOY $FILE_NAME_DEPLOY
# server_build_test:
publish_to_orquestra
:
# <<: *has_no_tags
<<
:
*build_and_distribute
# <<: *server_build_i
# stage: fast_test
# server_build:
# <<: *server_build_i
# stage: build
# script:
# - cd $SRV_DIR
# - chmod +x gradlew
# - ./gradlew spotlessJavaApply
# - ./gradlew build
# after_script:
# - mv srv/src/microcredito/configuration/build/libs/configuration-*.jar microcredito.jar
# artifacts:
# name: srv
# paths:
# - microcredito*.jar
# only:
# - develop
# server_delivery:
# <<: *version
# <<: *has_tag_server
# <<: *server_build_i
# stage: delivery
# script:
# # Seta variaveis
# - JAR_NAME=microcredito-$Version.jar
# - DOCKER_IMAGE_NAME=microcredito:$Version
# - DOCKER_PUSH_TARGET=$DOCKER_REGISTRY/$DOCKER_IMAGE_NAME
# - echo $JAR_NAME
# - echo $DOCKER_IMAGE_NAME
# - echo $DOCKER_PUSH_TARGET
# # Build
# - cd $SRV_DIR
# - chmod +x gradlew
# - ./gradlew spotlessJavaApply
# - ./gradlew build
# - cd ../../..
# - mv srv/src/microcredito/configuration/build/libs/configuration-*.jar $JAR_NAME
# # Gera o dockerfile
# - echo "FROM adoptopenjdk/openjdk8:alpine-jre" > Dockerfile
# - echo "" >> Dockerfile
# - echo "ARG JAR_FILE=$JAR_NAME" >> Dockerfile
# - echo "" >> Dockerfile
# - echo "WORKDIR /opt/app" >> Dockerfile
# - echo "" >> Dockerfile
# - echo "COPY \${JAR_FILE} app.jar" >> Dockerfile
# - echo "" >> Dockerfile
# - echo "ENTRYPOINT [\"java\",\"-jar\",\"app.jar\"]" >> Dockerfile
# # Gera o docker com a imagem
# - docker image build -t $DOCKER_PUSH_TARGET .
# # - docker tag $DOCKER_IMAGE_NAME $DOCKER_PUSH_TARGET
# - docker image push $DOCKER_PUSH_TARGET
# after_script:
# - docker rmi $DOCKER_IMAGE_NAME
# - docker rmi $DOCKER_PUSH_TARGET
# after_script:
# - mv srv/src/microcredito/configuration/build/libs/configuration-*.jar microcredito-$Version.jar
# artifacts:
# name: srv
# paths:
# - microcredito*.jar
server_deploy
:
<<
:
*version
<<
:
*has_tag_server
stage
:
deploy
stage
:
deploy
variables
:
GIT_STRATEGY
:
none
when
:
manual
script
:
-
dir _pacote_destino\opkg
-
python build\GerarPacote.py enviar_opkg --debug --build_config_path="$BUILD_ENVIROMENT_CONFIG_FILE_PATH" --dir_opkg="_pacote_destino\opkg" --app_ids="$ORQUESTRA_APP_IDS" --connection_string="$ORQUESTRA_CONNECTION_STRING"
dependencies
:
-
build_all
copy_autopop_package_to_server
:
<<
:
*has_tag_autopop_cli_pacote
stage
:
deploy_internally
tags
:
tags
:
-
delphi
-
rhel7
variables
:
variables
:
GIT_STRATEGY
:
none
GIT_STRATEGY
:
none
PATH_DEPLOY
:
\\srp1vp1\Publico\Pacotes\SGS
DOCKER_REGISTRY
:
dockerhub.dev.evologica.com.br
FILE_NAME_DEPLOY
:
${CI_COMMIT_TAG}
dependencies
:
-
build_autopop_web
script
:
-
python ${BUILD_ENVIROMENT_DIR}\scriptsCI\compress_file.py ${BUILD_ENVIROMENT_CONFIG_FILE_PATH} _pacote_web $PATH_DEPLOY $FILE_NAME_DEPLOY
publish_autopop_to_orquestra
:
<<
:
*has_tag_autopop_srv
stage
:
deploy
tags
:
-
delphi
variables
:
GIT_STRATEGY
:
none
when
:
manual
script
:
-
dir _pacote_destino\opkg
-
python build\GerarPacoteAutopop.py enviar_opkg_autopop --debug --build_config_path="$BUILD_ENVIROMENT_CONFIG_FILE_PATH" --dir_opkg="_pacote_destino\opkg" --app_ids="$ORQUESTRA_APP_IDS" --connection_string="$ORQUESTRA_EVO_CONNECTION_STRING" --tag_text=$env:CI_COMMIT_TAG
dependencies
:
-
build_autopop_srv
deploy_autopop_dev_cli_corretor
:
<<
:
*has_tag_autopop_dev_cli_corretor
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopopCorretor/
-
docker stop AutoPopCorretor
-
docker rm AutoPopCorretor
-
docker-compose up -d
deploy_autopop_dev_cli_banseg
:
<<
:
*has_tag_autopop_dev_cli_banseg
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopop_dev/
-
docker stop AutoPop
-
docker rm AutoPop
-
docker-compose up -d
deploy_autopop_dev_cli_banescor
:
<<
:
*has_tag_autopop_dev_cli_banescor
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopopBanescor/
-
docker stop AutoPopBanescor
-
docker rm AutoPopBanescor
-
docker-compose up -d
deploy_autopop_dev_cli_segcor
:
<<
:
*has_tag_autopop_dev_cli_segcor
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopopCliente/corretor
-
docker stop AutoPopClienteCorretor
-
docker rm AutoPopClienteCorretor
-
docker-compose up -d
deploy_autopop_dev_cli_segurado
:
<<
:
*has_tag_autopop_dev_cli_segurado
stage
:
deploy
tags
:
-
autopop
script
:
script
:
-
cd ~/services/autopopCliente/segurado
-
DOCKER_IMAGE_NAME=$DOCKER_REGISTRY/microcredito:$Version
-
docker stop AutoPopClienteSegurado
-
echo $DOCKER_IMAGE_NAME
-
docker rm AutoPopClienteSegurado
-
docker image pull $DOCKER_IMAGE_NAME
-
docker-compose up -d
-
docker stop microcredito
-
docker rm microcredito
-
docker run -d --name microcredito --expose 8080 -p 8080:8080 --restart unless-stopped $DOCKER_IMAGE_NAME
deploy_autopop_homolog_cli_corretor
:
#################################################################################################
<<
:
*has_tag_autopop_homolog_cli_corretor
# API #
stage
:
deploy
#################################################################################################
tags
:
-
autopop
script
:
-
cd ~/services/autopopHomolog/corretor/
-
docker stop AutoPopCorretorHomolog
-
docker rm AutoPopCorretorHomolog
-
docker-compose up -d
deploy_autopop_homolog_cli_banseg
:
.api_build_i
:
&api_build_i
<<
:
*has_tag_autopop_homolog_cli_banseg
variables
:
stage
:
deploy
API_SPECS_DIR
:
srv/src/microcredito/adapters/web/src/main/java/microcredito/adapter/web/specs
tags
:
API_OUTPUT_DIR
:
../../../../../../../../../../../../api_output
-
autopop
ADDITIONAL_PROPERTIES
:
npmName=@microcredito/client,npmRepository=https://nexus.dev.evologica.com.br/repository/npm-internal,supportsES6=true,typescriptThreePlus=true,legacyDiscriminatorBehavior=false
script
:
before_script
:
-
cd ~/services/autopopHomolog/banseg
-
openapi-generator --version
-
docker stop AutoPopHomolog
-
json --version
-
docker rm AutoPopHomolog
script
:
-
docker-compose up -d
# Compila .yaml
-
mkdir api_output
deploy_autopop_homolog_cli_banescor
:
-
cd $API_SPECS_DIR
<<
:
*has_tag_autopop_homolog_cli_banescor
-
echo "npx openapi-generator generate -i microcredito.service.yaml -g typescript-fetch --additional-properties npmName=@microcredito/client,npmRepository=https://nexus.dev.evologica.com.br/repository/npm-internal -o $API_OUTPUT_DIR --model-name-suffix ApiModel"
stage
:
deploy
-
npx openapi-generator generate -i microcredito.service.yaml -g typescript-fetch --additional-properties npmName=@microcredito/client,npmRepository=https://nexus.dev.evologica.com.br/repository/npm-internal -o $API_OUTPUT_DIR --model-name-suffix ApiModel
tags
:
# Gera/Altera arquivos do pacote
-
autopop
-
cd $API_OUTPUT_DIR
script
:
-
ls
-
cd ~/services/autopopHomolog/banescor
-
echo "init.author.name = admin" > .npmrc
-
docker stop AutoPopBanescorHomolog
-
echo "init.author.email = suporte@evologica.com.br" >> .npmrc
-
docker rm AutoPopBanescorHomolog
-
echo "email=suporte@evologica.com.br" >> .npmrc
-
docker-compose up -d
-
echo "" >> .npmrc
-
echo "always-auth=true" >> .npmrc
deploy_autopop_homolog_cli_segcor
:
-
echo "_auth=YWRtaW46amo1OFBkMDI=" >> .npmrc
<<
:
*has_tag_autopop_homolog_cli_segcor
-
json -I -f package.json -e "this.files=['dist']"
stage
:
deploy
# - json -I -f package.json -e "this.devDependencies={'typescript':'^3.8.3'}"
# Corrige buggera da exportacao
-
echo "import * as AgenteApiModels from './AgenteApi'" > src/apis/index.ts
-
echo "import * as ClienteApiModels from './ClienteApi'" >> src/apis/index.ts
-
echo "" >> src/apis/index.ts
-
echo "import { AgenteApi } from './AgenteApi'" >> src/apis/index.ts
-
echo "export { AgenteApi, AgenteApiModels }" >> src/apis/index.ts
-
echo "" >> src/apis/index.ts
-
echo "import { ClienteApi } from './ClienteApi'" >> src/apis/index.ts
-
echo "export { ClienteApi, ClienteApiModels }" >> src/apis/index.ts
-
echo "" >> src/apis/index.ts
-
echo "export * from './DefaultApi'" >> src/apis/index.ts
-
echo "export * from './DominioApi'" >> src/apis/index.ts
-
echo "export * from './AnonimoApi'" >> src/apis/index.ts
# Instala e publica novo pacote
-
npm i
-
ls
-
npm run build
-
ls
# api_build_test:
# <<: *api_build_i
# stage: fast_test
# tags:
# - android
# when: manual
# allow_failure: true
# artifacts:
# when: on_failure
# paths:
# - api_output
# expire_in: 2 hours
# except:
# - tags
api_build
:
<<
:
*api_build_i
<<
:
*has_tag_api_internal
stage
:
build
tags
:
tags
:
-
a
utopop
-
a
ndroid
script
:
artifacts
:
-
cd ~/services/autopopClienteHomolog/corretor
when
:
always
-
docker stop AutoPopClienteCorretorHomolog
paths
:
-
docker rm AutoPopClienteCorretorHomolog
-
api_output
-
docker-compose up -d
expire_in
:
4 hours
deploy_autopop_homolog_cli_segurado
:
api_publish
:
<<
:
*has_tag_a
utopop_homolog_cli_segurado
<<
:
*has_tag_a
pi_internal
stage
:
deploy
stage
:
deploy
tags
:
tags
:
-
autopop
-
android
dependencies
:
-
api_build
script
:
script
:
-
cd ~/services/autopopClienteHomolog/segurado
-
cd api_output
-
docker stop AutoPopClienteSeguradoHomolog
-
npm publish
-
docker rm AutoPopClienteSeguradoHomolog
-
docker-compose up -d
#
-----------------------------------------------------------------------------------
#
#
###############################################################################################
#
#
---------------------------------------BADGE---------------------------------------
#
#
BADGES
#
#
-----------------------------------------------------------------------------------
#
#
###############################################################################################
#
generate_badges
:
generate_badges
:
stage
:
badge
stage
:
badge
s
tags
:
tags
:
-
python_script
-
python_script
when
:
always
allow_failure
:
true
variables
:
variables
:
GIT_STRATEGY
:
none
GIT_STRATEGY
:
fetch
dependencies
:
# cache: {}
before_script
:
-
mkdir public
script
:
script
:
-
python build\generate_badges.py
${CURIO_VERSION}
-
python build\generate_badges.py
artifacts
:
artifacts
:
name
:
pages
paths
:
paths
:
-
./*.svg
-
./
public/
*.svg
expire_in
:
2 weeks
expire_in
:
2 weeks
only
:
only
:
-
master
-
develop
update_badges
:
pages
:
<<
:
*build_and_distribute
stage
:
badges
stage
:
badge
variables
:
GIT_STRATEGY
:
none
script
:
script
:
-
echo "Gerando badges"
-
echo "hi"
after_script
:
artifacts
:
-
python ${BUILD_ENVIROMENT_DIR}\scriptsCI\reexecute_last_master_badge_job.py ${PROJECT_ID} ${PROJECT_TOKEN}
name
:
pages
paths
:
-
public
only
:
-
master
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment