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
:
-
prebuild
-
prebuildtest
-
buildweb
-
build
-
test
-
deploy_internally
-
delivery
-
deploy
-
badge
-
badge
s
.only_build
:
&only_build
stage
:
build
tags
:
-
delphi
variables
:
GIT_STRATEGY
:
fetch
variables
:
LC_ALL
:
'
en_US.UTF-8'
LANG
:
'
en_US.UTF-8'
.has_no_tags
:
&has_no_tags
only
:
-
branches
except
:
-
tags
-
develop
.build_and_distribute
:
&build_and_distribute
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
.version
:
&version
before_script
:
# Version
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
4
)`
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
2
)`
-
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
:
# Version
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
2
)`
-
Version=`echo "$CI_COMMIT_TAG" | (cut -d'/' -f
3
)`
-
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/
-
VersionCode=`echo "$Version" | (cut -d'.' -f 1 )``echo "$Version" | (cut -d'.' -f 2 )``echo "$Version" | (cut -d'.' -f 3 )`
-
echo $VersionCode
#-----------------------------------------------------------------------------------#
#-----------------------------IDENTIFICAÇÃO DE TAGS---------------------------------#
#-----------------------------------------------------------------------------------#
.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}/
#################################################################################################
# TAG IDENTIFICATION #
#################################################################################################
.has_tag_autopop_srv
:
&has_tag_autopop_srv
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
.has_tag_cliente_web
:
&has_tag_cliente_web
stage
:
deploy
only
:
refs
:
-
tags
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
:
refs
:
-
tags
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
:
refs
:
-
tags
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
:
refs
:
-
tags
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
:
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}/
#################################################################################################
# Android APP BUILD #
#################################################################################################
#-----------------------------------------------------------------------------------#
#-----------------------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
.build_app_cliente_web
:
&build_app_cliente_web
before_script
:
-
New-Item -ItemType Directory -Force -Path Comum
-
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'"
-
cd cli/web/cliente
-
yarn
# Buildar segurado
-
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
-
yarn build
artifacts
:
# expose_as: 'servico' # Not avaliable until gitlab version 12.5
name
:
$ARTIFACT_NAME
expire_in
:
1 week
name
:
dist
paths
:
-
_pacote_destino
#-----------------------------------------------------------------------------------#
#-----------------------------------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/
-
cli/web/cliente/dist
expire_in
:
2 weeks
after_script
:
-
rm node_modules
-
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
:
<<
:
*has_tag_autopop_homolog_cli_banescor
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:banescor:homolog
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopHomolog/banescor/
deploy_app_cliente_web
:
<<
:
*has_tag_cliente_web
<<
:
*web
<<
:
*build_app_cliente_web
script
:
-
cp -R cli/web/cliente/dist ~/services/agiliza/cliente
artifacts
:
name
:
dist
paths
:
-
cli/web/cliente/dist
expire_in
:
2 weeks
after_script
:
-
rm node_modules
-
rm dist
build_autopop_homolog_cli_segcor
:
<<
:
*has_tag_autopop_homolog_cli_segcor
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:segcor:homolog
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopClienteHomolog/corretor
.build_app_agente_web
:
&build_app_agente_web
before_script
:
-
cd cli/web/agente
-
yarn
-
yarn build
artifacts
:
name
:
dist
paths
:
-
cli/web/agente/dist
expire_in
:
2 weeks
after_script
:
-
rm node_modules
-
rm dist
build_autopop_homolog_cli_segurado
:
<<
:
*has_tag_autopop_homolog_cli_segurado
<<
:
*autopop_cli
stage
:
build
tags
:
-
autopop
script
:
# Build
-
cd AutoPop/cli/web/corretor/
-
yarn
-
yarn build:segurado:homolog
# Copiar dist pro diretório do container
-
cp -R dist ~/services/autopopClienteHomolog/segurado
deploy_app_cliente_web
:
<<
:
*web
<<
:
*has_tag_agente_web
<<
:
*build_app_agente_web
script
:
-
cp -R cli/web/cliente/dist ~/services/agiliza/cliente
artifacts
:
name
:
dist
paths
:
-
cli/web/cliente/dist
expire_in
:
2 weeks
after_script
:
-
rm node_modules
-
rm dist
#-----------------------------------------------------------------------------------#
#---------------------------------------DEPLOY--------------------------------------#
#-----------------------------------------------------------------------------------#
copy_package_to_server
:
<<
:
*build_and_distribute
stage
:
deploy_internally
variables
:
GIT_STRATEGY
:
none
PATH_DEPLOY
:
\\srp1vp1\Publico\Pacotes\SGS
FILE_NAME_DEPLOY
:
${CI_COMMIT_TAG}
dependencies
:
-
build_all
script
:
-
python ${BUILD_ENVIROMENT_DIR}\scriptsCI\compress_file.py ${BUILD_ENVIROMENT_CONFIG_FILE_PATH} _pacote_destino $PATH_DEPLOY $FILE_NAME_DEPLOY
publish_to_orquestra
:
<<
:
*build_and_distribute
#################################################################################################
# SERVER BUILD #
#################################################################################################
# .server_build_i: &server_build_i
# tags:
# - rhel7
# variables:
# SRV_DIR: srv/src/microcredito/
# DOCKER_REGISTRY: dockerhub.dev.evologica.com.br
# script:
# - cd $SRV_DIR
# - chmod +x gradlew
# - ./gradlew spotlessJavaApply
# - ./gradlew assemble
# server_build_test:
# <<: *has_no_tags
# <<: *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
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
:
-
delphi
-
rhel7
variables
:
GIT_STRATEGY
:
none
PATH_DEPLOY
:
\\srp1vp1\Publico\Pacotes\SGS
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
DOCKER_REGISTRY
:
dockerhub.dev.evologica.com.br
script
:
-
cd ~/services/autopopCliente/segurado
-
docker stop AutoPopClienteSegurado
-
docker rm AutoPopClienteSegurado
-
docker-compose up -d
-
DOCKER_IMAGE_NAME=$DOCKER_REGISTRY/microcredito:$Version
-
echo $DOCKER_IMAGE_NAME
-
docker image pull $DOCKER_IMAGE_NAME
-
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
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopopHomolog/corretor/
-
docker stop AutoPopCorretorHomolog
-
docker rm AutoPopCorretorHomolog
-
docker-compose up -d
#################################################################################################
# API #
#################################################################################################
deploy_autopop_homolog_cli_banseg
:
<<
:
*has_tag_autopop_homolog_cli_banseg
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopopHomolog/banseg
-
docker stop AutoPopHomolog
-
docker rm AutoPopHomolog
-
docker-compose up -d
deploy_autopop_homolog_cli_banescor
:
<<
:
*has_tag_autopop_homolog_cli_banescor
stage
:
deploy
tags
:
-
autopop
script
:
-
cd ~/services/autopopHomolog/banescor
-
docker stop AutoPopBanescorHomolog
-
docker rm AutoPopBanescorHomolog
-
docker-compose up -d
deploy_autopop_homolog_cli_segcor
:
<<
:
*has_tag_autopop_homolog_cli_segcor
stage
:
deploy
.api_build_i
:
&api_build_i
variables
:
API_SPECS_DIR
:
srv/src/microcredito/adapters/web/src/main/java/microcredito/adapter/web/specs
API_OUTPUT_DIR
:
../../../../../../../../../../../../api_output
ADDITIONAL_PROPERTIES
:
npmName=@microcredito/client,npmRepository=https://nexus.dev.evologica.com.br/repository/npm-internal,supportsES6=true,typescriptThreePlus=true,legacyDiscriminatorBehavior=false
before_script
:
-
openapi-generator --version
-
json --version
script
:
# Compila .yaml
-
mkdir api_output
-
cd $API_SPECS_DIR
-
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"
-
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
# Gera/Altera arquivos do pacote
-
cd $API_OUTPUT_DIR
-
ls
-
echo "init.author.name = admin" > .npmrc
-
echo "init.author.email = suporte@evologica.com.br" >> .npmrc
-
echo "email=suporte@evologica.com.br" >> .npmrc
-
echo "" >> .npmrc
-
echo "always-auth=true" >> .npmrc
-
echo "_auth=YWRtaW46amo1OFBkMDI=" >> .npmrc
-
json -I -f package.json -e "this.files=['dist']"
# - 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
:
-
a
utopop
script
:
-
cd ~/services/autopopClienteHomolog/corretor
-
docker stop AutoPopClienteCorretorHomolog
-
docker rm AutoPopClienteCorretorHomolog
-
docker-compose up -d
-
a
ndroid
artifacts
:
when
:
always
paths
:
-
api_output
expire_in
:
4 hours
deploy_autopop_homolog_cli_segurado
:
<<
:
*has_tag_a
utopop_homolog_cli_segurado
api_publish
:
<<
:
*has_tag_a
pi_internal
stage
:
deploy
tags
:
-
autopop
-
android
dependencies
:
-
api_build
script
:
-
cd ~/services/autopopClienteHomolog/segurado
-
docker stop AutoPopClienteSeguradoHomolog
-
docker rm AutoPopClienteSeguradoHomolog
-
docker-compose up -d
-
cd api_output
-
npm publish
#
-----------------------------------------------------------------------------------
#
#
---------------------------------------BADGE---------------------------------------
#
#
-----------------------------------------------------------------------------------
#
#
###############################################################################################
#
#
BADGES
#
#
###############################################################################################
#
generate_badges
:
stage
:
badge
stage
:
badge
s
tags
:
-
python_script
when
:
always
allow_failure
:
true
variables
:
GIT_STRATEGY
:
none
dependencies
:
GIT_STRATEGY
:
fetch
# cache: {}
before_script
:
-
mkdir public
script
:
-
python build\generate_badges.py
${CURIO_VERSION}
-
python build\generate_badges.py
artifacts
:
name
:
pages
paths
:
-
./*.svg
-
./
public/
*.svg
expire_in
:
2 weeks
only
:
-
master
-
develop
update_badges
:
<<
:
*build_and_distribute
stage
:
badge
variables
:
GIT_STRATEGY
:
none
pages
:
stage
:
badges
script
:
-
echo "Gerando badges"
after_script
:
-
python ${BUILD_ENVIROMENT_DIR}\scriptsCI\reexecute_last_master_badge_job.py ${PROJECT_ID} ${PROJECT_TOKEN}
-
echo "hi"
artifacts
:
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