32 Commits

Author SHA1 Message Date
Jonathã Correa b468049cfb Adicionando sistema C5_mambo
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-04-22 14:46:09 -03:00
Jonathã Correa c81d631cf0 Ajuste na query de produto
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-04-22 14:42:07 -03:00
gabriel.diniz 137ebdece2 fix flash companies modules filter
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-04-01 16:51:08 -03:00
tkinaba bbc52c8cd1 fix(consulta-de-produto): usar a variável ctx_user_companies_for_module
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-04-01 10:19:40 -03:00
tkinaba f3497dbff3 doc: migrations
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-03-27 17:09:12 -03:00
tkinaba 02ce1fdf01 fix: tentativa de resolver a lentidão
davinTI/app-dono-modulos/pipeline/head This commit looks good
removendo o is null
2026-03-26 17:43:50 -03:00
tkinaba 005be96d2b fix: tentativa de arrumar a lentidão com optimizer hints
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-03-26 14:58:37 -03:00
gabriel.diniz 26f673f4e9 return original detail query
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-26 10:38:33 -03:00
gabriel.diniz 96caf54474 change query detalhe
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-03-26 08:51:55 -03:00
gabriel.diniz 088f13d9a1 added companie filter in flash querie
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-25 15:34:18 -03:00
gabriel.diniz d6414c9219 fix detail stock move
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-24 10:22:42 -03:00
gabriel.diniz 9aff600d75 removed semicolon from queries
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-24 10:07:54 -03:00
gabriel.diniz 0b9d03dffb added details queries
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-24 09:22:33 -03:00
gabriel.diniz 24a40126de change filter product search
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-03-18 11:38:44 -03:00
gabriel.diniz 662d44c137 fix error
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-18 11:29:27 -03:00
gabriel.diniz d8c592bb70 change filter from product search
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-03-18 11:20:55 -03:00
gabriel.diniz 81c1bf9dc0 Merge branch 'main' of ssh://git.davinti.com.br:2222/davinTI/app-dono-modulos
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-12 20:13:58 -03:00
gabriel.diniz 7d15179fc8 fix detalhe product sql 2026-03-12 20:13:40 -03:00
tkinaba 17141b7e76 ci: push migration tar to s3
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-12 16:33:49 -03:00
tkinaba ae847b96d7 Merge branch 'main' into develop
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-12 16:33:43 -03:00
gabriel.diniz 55d3c84cf3 fix consulta product sql
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-11 17:19:46 -03:00
tkinaba 1b965e293f bump jeff version v1.0.7
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-10 14:29:55 -03:00
gabriel.diniz 9318e734a5 bump version
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-06 14:01:58 -03:00
gabriel.diniz 74bf1abad8 add product detail query
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-03-04 16:35:38 -03:00
gabriel.diniz bac2c74190 fix search product module
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-03 16:40:42 -03:00
gabriel.diniz 3f0383a7b2 fixed searchProduct sql
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-03 10:00:21 -03:00
gabriel.diniz 90af924221 Merge branch 'develop' of ssh://git.davinti.com.br:2222/davinTI/app-dono-modulos into develop
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-03-02 11:21:24 -03:00
gabriel.diniz 49eca1605a changed sql query and filter 2026-03-02 11:21:03 -03:00
tkinaba 9a894998bf ci: fix ws permissions
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-02-27 15:09:23 -03:00
tkinaba cf1f4dcde3 ci: push to s3
davinTI/app-dono-modulos/pipeline/head There was a failure building this commit
2026-02-27 14:14:22 -03:00
tkinaba 28bba63131 ci: init
davinTI/app-dono-modulos/pipeline/head This commit looks good
2026-02-27 12:44:11 -03:00
tiago.inaba c7cd22c343 Merge pull request 'feat: add new module consulta de produtos' (#1) from feature/new-modules into develop
Reviewed-on: #1
2026-02-27 15:10:48 +00:00
6 changed files with 1468 additions and 38 deletions
Vendored
+73
View File
@@ -0,0 +1,73 @@
pipeline {
agent {
docker {
image 'hub.davinti.com.br:443/infra/node:latest'
args '-u 1001:1001 --rm --entrypoint="" -e HOME=${WORKSPACE}'
}
}
environment {
S3_BUCKET = "s3://app-dono-manifests"
GIT_TOKEN = credentials('gitea-pat')
}
stages {
stage('Install') {
steps {
sh """
# Create a .netrc file so Git can find the PAT for your Gitea domain
echo "machine git.davinti.com.br" > ~/.netrc
echo "login jenkins" >> ~/.netrc
echo "password ${GIT_TOKEN}" >> ~/.netrc
chmod 600 ~/.netrc
npm install
"""
}
}
stage('Vet') {
steps {
echo 'Validating modules (Standard for all branches)...'
sh 'npx jeff vet -i "src/**/*.module.ts" --strict'
}
}
stage('Generate & Upload') {
when {
branch 'main'
}
steps {
echo 'Generating manifest and deploying to S3...'
sh 'npm run generate:output'
sh 'tar -czvf migrations.tar.gz -C migrations/ .'
withAWS(credentials: 'aws-jeff-credentials-id', region: 'sa-east-1') {
script {
echo "Uploading to S3..."
sh "aws s3 cp dist/manifest.json ${S3_BUCKET}/manifest.json"
sh "aws s3 cp migrations.tar.gz ${S3_BUCKET}/migrations.tar.gz"
}
}
}
}
}
post {
always {
sh 'rm -rf *'
script {
deleteDir()
}
}
success {
echo "✨ Manifest successfully uploaded to S3!"
}
failure {
echo "❌ Build failed. Check the logs for Jeff's validation errors."
}
}
}
+37
View File
@@ -0,0 +1,37 @@
# Migrations
Este projeto utiliza [pressly/goose](https://github.com/pressly/goose) para
gerenciamento de migrações de banco de dados. Cada ERP possui seu próprio set de
migrations. Por exemplo, `migrations/C5/*.sql`, `migrations/SENIOR/*.sql`...
## Instalação
```bash
go install github.com/pressly/goose/v3/cmd/goose@latest
```
## Criando uma migração
```bash
goose -dir migrations/<ERP> create nome_da_migracao sql
```
Isso gera um arquivo com timestamp no formato
`YYYYMMDDHHMMSS_nome_da_migracao.sql` contendo seções `-- +goose Up` e `--
+goose Down`.
## Boas práticas
- **Sempre escreva a migração `Down`**: garante que a migração possa ser
revertida com segurança.
- **Uma mudança por migração**: mantenha cada arquivo focado em uma única
alteração (criar tabela, adicionar coluna, etc.).
- **Migrações devem ser idempotentes quando possível**: use `IF NOT EXISTS` /
`IF EXISTS` para evitar falhas em re-execução.
- **Nunca altere uma migração já aplicada**: se algo precisa ser corrigido, crie
uma nova migração.
- **Evite migrações destrutivas em produção**: prefira adicionar colunas
nullable e remover as antigas em uma migração posterior, em vez de renomear ou
deletar diretamente.
- **Teste localmente antes de aplicar**: rode `up` e `down` no ambiente local
para verificar que ambas as direções funcionam.
+3 -3
View File
@@ -9,15 +9,15 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.5" "@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.8"
}, },
"devDependencies": { "devDependencies": {
"tsx": "^4.21.0" "tsx": "^4.21.0"
} }
}, },
"node_modules/@davinti/jeff": { "node_modules/@davinti/jeff": {
"version": "1.0.5", "version": "1.0.8",
"resolved": "git+https://git.davinti.com.br/davinTI/jeff.git#de72040736f1459809722c87d602185ae470fb76", "resolved": "git+https://git.davinti.com.br/davinTI/jeff.git#aa32d9bc6e5ab4b6a4c5f2748fa68e4bfdd2b4e2",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@types/glob": "^8.1.0", "@types/glob": "^8.1.0",
+1 -1
View File
@@ -12,7 +12,7 @@
"license": "ISC", "license": "ISC",
"description": "", "description": "",
"dependencies": { "dependencies": {
"@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.5" "@davinti/jeff": "git+https://git.davinti.com.br/davinTI/jeff.git#v1.0.8"
}, },
"devDependencies": { "devDependencies": {
"tsx": "^4.21.0" "tsx": "^4.21.0"
+1
View File
@@ -99,6 +99,7 @@ inner join mboard.tb_empresa_segmento tes
where 1=1 where 1=1
and tvf.vlrvendaacumulada > 0 and tvf.vlrvendaacumulada > 0
and tvf.dtavda = TO_DATE(${args.data_venda}, 'YYYY-MM-DD') and tvf.dtavda = TO_DATE(${args.data_venda}, 'YYYY-MM-DD')
and (tvf.nroempresa in (${args.ctx_user_companies_for_module}))
group by rollup(canalapp, nomeempresaapp) group by rollup(canalapp, nomeempresaapp)
order by grouping(canalapp) desc, grouping(nomeempresaapp) desc`, order by grouping(canalapp) desc, grouping(nomeempresaapp) desc`,
}; };
File diff suppressed because it is too large Load Diff