fix(ci): fix CI build and update Makefile to build all services

This commit is contained in:
2025-11-06 22:34:49 +01:00
parent ad4ecaed1f
commit 471a057d25
2 changed files with 15 additions and 6 deletions

View File

@@ -38,6 +38,7 @@ jobs:
apk add --no-cache protobuf-dev protoc apk add --no-cache protobuf-dev protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate protobuf files - name: Generate protobuf files
run: make generate-proto run: make generate-proto
@@ -102,6 +103,7 @@ jobs:
apk add --no-cache protobuf-dev protoc apk add --no-cache protobuf-dev protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate protobuf files - name: Generate protobuf files
run: make generate-proto run: make generate-proto
@@ -147,6 +149,7 @@ jobs:
apk add --no-cache protobuf-dev protoc apk add --no-cache protobuf-dev protoc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate protobuf files - name: Generate protobuf files
run: make generate-proto run: make generate-proto
@@ -159,9 +162,7 @@ jobs:
fi fi
- name: Build - name: Build
run: | run: make build
go build -v -o bin/platform ./cmd/platform
go build -v -o bin/api-gateway ./cmd/api-gateway
- name: Upload build artifacts - name: Upload build artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -170,6 +171,10 @@ jobs:
path: | path: |
bin/platform bin/platform
bin/api-gateway bin/api-gateway
bin/auth-service
bin/identity-service
bin/authz-service
bin/audit-service
retention-days: 7 retention-days: 7
fmt: fmt:

View File

@@ -18,7 +18,7 @@ help:
@echo " make lint - Run linters" @echo " make lint - Run linters"
@echo " make fmt - Format code" @echo " make fmt - Format code"
@echo " make fmt-check - Check code formatting" @echo " make fmt-check - Check code formatting"
@echo " make build - Build platform and api-gateway binaries" @echo " make build - Build all service binaries"
@echo " make clean - Clean build artifacts" @echo " make clean - Clean build artifacts"
@echo " make docker-build - Build Docker image" @echo " make docker-build - Build Docker image"
@echo " make docker-run - Run Docker container" @echo " make docker-run - Run Docker container"
@@ -85,10 +85,14 @@ fmt-check:
@echo "Code is properly formatted" @echo "Code is properly formatted"
build: build:
@echo "Building platform and api-gateway binaries..." @echo "Building all service binaries..."
$(GO) build -v -o bin/platform ./cmd/platform $(GO) build -v -o bin/platform ./cmd/platform
$(GO) build -v -o bin/api-gateway ./cmd/api-gateway $(GO) build -v -o bin/api-gateway ./cmd/api-gateway
@echo "Build complete: bin/platform, bin/api-gateway" $(GO) build -v -o bin/auth-service ./cmd/auth-service
$(GO) build -v -o bin/identity-service ./cmd/identity-service
$(GO) build -v -o bin/authz-service ./cmd/authz-service
$(GO) build -v -o bin/audit-service ./cmd/audit-service
@echo "Build complete: bin/platform, bin/api-gateway, bin/auth-service, bin/identity-service, bin/authz-service, bin/audit-service"
clean: clean:
@echo "Cleaning build artifacts..." @echo "Cleaning build artifacts..."