Agregar despliegue automatico en CI y en schedule (#3)
All checks were successful
CodyOps Core Builder / build-conteiner (push) Successful in 2m56s
All checks were successful
CodyOps Core Builder / build-conteiner (push) Successful in 2m56s
Reviewed-on: #3 Co-authored-by: Luciano Giacchetta <giacchetta-@outlook.com> Co-committed-by: Luciano Giacchetta <giacchetta-@outlook.com>
This commit is contained in:
parent
18fa2778df
commit
e5642145a7
@ -1,6 +1,8 @@
|
|||||||
name: CodyOps Core Builder
|
name: CodyOps Core Builder
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 11 * * 1'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@ -65,4 +67,5 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Make Build
|
- name: Make Build
|
||||||
run: make build
|
run: make build
|
||||||
|
- name: Make Deploy
|
||||||
|
run: make deploy
|
10
Makefile
10
Makefile
@ -1,8 +1,9 @@
|
|||||||
REGISTRY:= gianet.us/codyops
|
NAMESPACE:= codyops
|
||||||
|
REGISTRY:= gianet.us/$(NAMESPACE)
|
||||||
IMAGE:= core
|
IMAGE:= core
|
||||||
COUNTRIES:= ar br cl co cr do ec es mx pa pe pr py sv us uy
|
COUNTRIES:= ar br cl co cr do ec es mx pa pe pr py sv us uy
|
||||||
|
|
||||||
.PHONY: init build setup $(addprefix step-,$(COUNTRIES))
|
.PHONY: init build setup $(addprefix step-,$(COUNTRIES)) $(addprefix deploy-,$(DOMAINS))
|
||||||
|
|
||||||
init:
|
init:
|
||||||
direnv allow .
|
direnv allow .
|
||||||
@ -21,3 +22,8 @@ $(addprefix step-,$(COUNTRIES)):
|
|||||||
npx astro build --force
|
npx astro build --force
|
||||||
podman build --pull=newer --tag $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@) .
|
podman build --pull=newer --tag $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@) .
|
||||||
podman push $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@)
|
podman push $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@)
|
||||||
|
|
||||||
|
deploy: $(addprefix deploy-,$(COUNTRIES))
|
||||||
|
|
||||||
|
$(addprefix deploy-,$(COUNTRIES)):
|
||||||
|
kubectl -n $(NAMESPACE) rollout restart deployment/$(NAMESPACE)-$(IMAGE)-$(shell echo $(patsubst deploy-%,%,$@))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user