Agregar despliegue automatico en CI y en schedule
All checks were successful
CodyOps Core Builder / build-conteiner (pull_request) Successful in 2m53s
All checks were successful
CodyOps Core Builder / build-conteiner (pull_request) Successful in 2m53s
This commit is contained in:
parent
18fa2778df
commit
b981a479f0
@ -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