Fix CI build and update Makefile to build all services
- Add $HOME/go/bin to PATH using $GITHUB_PATH for protoc plugins - Update Makefile build target to build all service binaries: - platform, api-gateway, auth-service, identity-service, authz-service, audit-service - Update CI workflow to use 'make build' instead of individual commands - Upload all service binaries as CI artifacts - Fixes protoc plugin discovery and ensures all services are built
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -38,6 +38,7 @@ jobs:
|
||||
apk add --no-cache protobuf-dev protoc
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Generate protobuf files
|
||||
run: make generate-proto
|
||||
@@ -102,6 +103,7 @@ jobs:
|
||||
apk add --no-cache protobuf-dev protoc
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Generate protobuf files
|
||||
run: make generate-proto
|
||||
@@ -147,6 +149,7 @@ jobs:
|
||||
apk add --no-cache protobuf-dev protoc
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Generate protobuf files
|
||||
run: make generate-proto
|
||||
@@ -159,9 +162,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
go build -v -o bin/platform ./cmd/platform
|
||||
go build -v -o bin/api-gateway ./cmd/api-gateway
|
||||
run: make build
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -170,6 +171,10 @@ jobs:
|
||||
path: |
|
||||
bin/platform
|
||||
bin/api-gateway
|
||||
bin/auth-service
|
||||
bin/identity-service
|
||||
bin/authz-service
|
||||
bin/audit-service
|
||||
retention-days: 7
|
||||
|
||||
fmt:
|
||||
|
||||
10
Makefile
10
Makefile
@@ -18,7 +18,7 @@ help:
|
||||
@echo " make lint - Run linters"
|
||||
@echo " make fmt - Format code"
|
||||
@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 docker-build - Build Docker image"
|
||||
@echo " make docker-run - Run Docker container"
|
||||
@@ -85,10 +85,14 @@ fmt-check:
|
||||
@echo "Code is properly formatted"
|
||||
|
||||
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/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:
|
||||
@echo "Cleaning build artifacts..."
|
||||
|
||||
Reference in New Issue
Block a user