Skip to content

Commit

Permalink
Add Makefile target for pipeline deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
janboll committed Dec 20, 2024
1 parent 8f1d889 commit 5b15ccb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/services-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
env:
PRINCIPAL_ID: ${{ secrets.GHA_PRINCIPAL_ID }}
run: |
./run_pipeline.sh dev ./frontend/pipeline.yaml deploy -c public -d
make frontend.dry_run
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ infra.clean:
# separator "/" (used for maestro only).

# Services deployed on "svc" aks cluster
services_svc = istio metrics maestro.server maestro.registration cluster-service frontend backend
services_svc = istio metrics maestro.server maestro.registration cluster-service backend
# Services deployed on "mgmt" aks cluster(s)
services_mgmt = acm maestro.agent pko hypershiftoperator
# List of all services
Expand All @@ -120,7 +120,23 @@ services_all = $(join services_svc,services_mgmt)
exit 1;\
fi

svc.deployall: $(addsuffix .deploy, $(services_svc))

# Pipelines section
# This sections is used to reference pipeline runs and should replace
# the usage of `svc-deploh.sh` script in the future.
services_svc_pipelines = frontend
%.deploy:
$(eval export dirname=$(subst .,/,$(basename $@)))
./run_pipeline.sh $(DEPLOY_ENV) ./$(dirname)/pipeline.yaml deploy -c public

services_svc_pipelines = frontend
%.dry_run:
$(eval export dirname=$(subst .,/,$(basename $@)))
./run_pipeline.sh $(DEPLOY_ENV) ./$(dirname)/pipeline.yaml deploy -c public -d

services_svc_all = $(join services_svc, services_svc_pipelines)

svc.deployall: $(addsuffix .deploy, $(services_svc_all))
mgmt.deployall: $(addsuffix .deploy, $(services_mgmt))
deployall: svc.deployall mgmt.deployall

Expand Down

0 comments on commit 5b15ccb

Please sign in to comment.