Skip to content

Commit

Permalink
Merge pull request #544 from LerianStudio/Refactor/MIDAZ-543
Browse files Browse the repository at this point in the history
Refactor/MDIAZ-543
  • Loading branch information
MartinezAvellan authored Feb 24, 2025
2 parents 1f53317 + 39e07bb commit 0de0584
Show file tree
Hide file tree
Showing 45 changed files with 9 additions and 2,942 deletions.
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- [ ] Onboarding
- [ ] Mdz
- [ ] Transaction
- [ ] Audit
- [ ] Pipeline
- [ ] Documentation

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
strategy:
matrix:
app:
- name: "midaz-audit"
working_dir: "components/audit"
- name: "midaz-onboarding"
working_dir: "components/onboarding"
- name: "midaz-transaction"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/env-vars-pr-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
CHANGED=false
# Verificando se os arquivos .env.example mudaram
for file in $(git diff --name-only $PREVIOUS_COMMIT $CURRENT_COMMIT | grep -E 'components/(audit|auth|infra|ledger|mdz|transaction)/.*\.env.example'); do
for file in $(git diff --name-only $PREVIOUS_COMMIT $CURRENT_COMMIT | grep -E 'components/(auth|infra|ledger|mdz|transaction)/.*\.env.example'); do
# Exibindo qual arquivo estamos verificando
echo "Checking file: $file"
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/midaz-update-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
cp midaz/components/audit/api/swagger.json LerianStudio.github.io/audit/
cp midaz/components/audit/api/openapi.yaml LerianStudio.github.io/audit/
cp midaz/components/onboarding/api/swagger.json LerianStudio.github.io/onboarding/
cp midaz/components/onboarding/api/openapi.yaml LerianStudio.github.io/onboarding/
Expand All @@ -137,7 +134,7 @@ jobs:
git remote set-url origin https://${{ secrets.MANAGE_TOKEN }}@github.com/LerianStudio/LerianStudio.github.io.git
git add audit onboarding transaction
git add onboarding transaction
git commit -S -m "Update openapi.yaml and swagger.json from Repositories"
git push origin main
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/update-env-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ jobs:
echo "LEDGER version: $VERSION"
echo "::set-output name=version::$VERSION"
- name: Update AUDIT Env
if: steps.latest_release.outputs.tag != steps.env_release.outputs.version
run: |
sed -i "s/^VERSION=.*/VERSION=${{ steps.latest_release.outputs.tag }}/" ./components/audit/.env.example
- name: Update ONBOARDING Env
if: steps.latest_release.outputs.tag != steps.env_release.outputs.version
run: |
Expand Down
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
AUDIT_DIR := ./components/audit
AUTH_DIR := ./components/auth
INFRA_DIR := ./components/infra
MDZ_DIR := ./components/mdz
Expand Down Expand Up @@ -65,7 +64,6 @@ help:
@echo " make infra Run a command inside the infra app in the components directory to see available commands."
@echo " make onboarding Run a command inside the onboarding app in the components directory to see available commands."
@echo " make transaction Run a command inside the transaction app in the components directory to see available commands."
@echo " make audit Run a command inside the audit app in the components directory to see available commands."
@echo " make set-env Run a command to copy all .env.example to .env into respective folders."
@echo " make all-services Run a command to all services passing any individual container command."
@echo " make generate-docs-all Run a command to inside the onboarding and transaction app to generate swagger docs."
Expand All @@ -77,7 +75,6 @@ help:
@echo " make infra COMMAND=<cmd> - Run command in infra service"
@echo " make onboarding COMMAND=<cmd> - Run command in onboarding service"
@echo " make transaction COMMAND=<cmd> - Run command in transaction service"
@echo " make audit COMMAND=<cmd> - Run command in audit service"
@echo " make all-services COMMAND=<cmd> - Run command across all services"
@echo " make clean-docker - Run command to clean docker"
@echo ""
Expand Down Expand Up @@ -157,7 +154,6 @@ set-env:
cp -r $(ONBOARDING_DIR)/.env.example $(ONBOARDING_DIR)/.env
cp -r $(TRANSACTION_DIR)/.env.example $(TRANSACTION_DIR)/.env
cp -r $(MDZ_DIR)/.env.example $(MDZ_DIR)/.env
cp -r $(AUDIT_DIR)/.env.example $(AUDIT_DIR)/.env
@echo "$(BLUE)Environment files created successfully$(NC)"

.PHONY: up
Expand Down Expand Up @@ -189,19 +185,13 @@ transaction:
@echo "$(BLUE)Executing command in transaction service...$(NC)"
$(MAKE) -C $(TRANSACTION_DIR) $(COMMAND)

.PHONY: audit
audit:
@echo "$(BLUE)Executing command in audit service...$(NC)"
$(MAKE) -C $(AUDIT_DIR) $(COMMAND)

.PHONY: all-services
all-services:
@echo "$(BLUE)Executing command across all services...$(NC)"
$(MAKE) -C $(AUTH_DIR) $(COMMAND) && \
$(MAKE) -C $(INFRA_DIR) $(COMMAND) && \
$(MAKE) -C $(ONBOARDING_DIR) $(COMMAND) && \
$(MAKE) -C $(TRANSACTION_DIR) $(COMMAND) && \
$(MAKE) -C $(AUDIT_DIR) $(COMMAND)
$(MAKE) -C $(TRANSACTION_DIR) $(COMMAND)

.PHONY: clean-docker
clean-docker:
Expand All @@ -225,5 +215,4 @@ tidy:
generate-docs-all:
@echo "$(BLUE)Executing command to generate swagger...$(NC)"
$(MAKE) -C $(ONBOARDING_DIR) generate-docs && \
$(MAKE) -C $(TRANSACTION_DIR) generate-docs && \
$(MAKE) -C $(AUDIT_DIR) generate-docs
$(MAKE) -C $(TRANSACTION_DIR) generate-docs
52 changes: 0 additions & 52 deletions STRUCTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,58 +29,6 @@ MIDAZ
| |-- chocolateyinstall.ps1
| `-- chocolateyuninstall.ps1
|-- components
| |-- audit
| | |-- Dockerfile
| | |-- Makefile
| | |-- api
| | | |-- docs.go
| | | |-- openapi.yaml
| | | |-- swagger.json
| | | `-- swagger.yaml
| | |-- artifacts
| | |-- cmd
| | | `-- app
| | | `-- main.go
| | |-- db
| | | `-- init.sql
| | |-- docker-compose.yml
| | `-- internal
| | |-- adapters
| | | |-- grpc
| | | | |-- in
| | | | `-- out
| | | | |-- trillian.grpc.go
| | | | `-- trillian.mock.go
| | | |-- http
| | | | |-- in
| | | | | |-- response.go
| | | | | |-- routes.go
| | | | | |-- swagger.go
| | | | | `-- trillian.go
| | | | `-- out
| | | |-- mongodb
| | | | `-- audit
| | | | |-- audit.go
| | | | |-- audit.mock.go
| | | | `-- audit.mongodb.go
| | | `-- rabbitmq
| | | |-- consumer.mock.go
| | | `-- consumer.rabbitmq.go
| | |-- bootstrap
| | | |-- config.go
| | | |-- consumer.go
| | | |-- server.go
| | | `-- service.go
| | `-- services
| | |-- create-log.go
| | |-- create-log_test.go
| | |-- get-audit-info.go
| | |-- get-audit-info_test.go
| | |-- get-log-by-hash.go
| | |-- get-log-by-hash_test.go
| | |-- usecase.go
| | |-- validate-log-hash.go
| | `-- validate-log-hash_test.go
| |-- auth
| | |-- Makefile
| | |-- artifacts
Expand Down
68 changes: 0 additions & 68 deletions components/audit/.env.example

This file was deleted.

19 changes: 0 additions & 19 deletions components/audit/Dockerfile

This file was deleted.

95 changes: 0 additions & 95 deletions components/audit/Makefile

This file was deleted.

Loading

0 comments on commit 0de0584

Please sign in to comment.