11REGISTRY ?= rg.fr-par.scw.cloud/funcscwriseriscvrunnerappqdvknz9s
22IMAGE ?= riscv-runner
3+ TAG ?= staging
34GOARCH ?= riscv64
45
6+
57.PHONY : build
68build : build-device-plugin build-node-labeller
79
@@ -18,31 +20,32 @@ container-build: container-build-device-plugin container-build-node-labeller
1820
1921.PHONY : container-build-device-plugin
2022container-build-device-plugin :
21- docker build --platform linux/riscv64 -f Dockerfile -t $(REGISTRY ) /$(IMAGE ) :device-plugin-latest .
23+ docker build --platform linux/riscv64 -f Dockerfile -t $(REGISTRY ) /$(IMAGE ) :device-plugin-$( TAG ) .
2224
2325.PHONY : container-build-node-labeller
2426container-build-node-labeller :
25- docker build --platform linux/riscv64 -f labeller.Dockerfile -t $(REGISTRY ) /$(IMAGE ) :node-labeller-latest .
27+ docker build --platform linux/riscv64 -f labeller.Dockerfile -t $(REGISTRY ) /$(IMAGE ) :node-labeller-$( TAG ) .
2628
2729.PHONY : container-push
2830container-push : container-push-device-plugin container-push-node-labeller
2931
3032.PHONY : container-push-device-plugin
3133container-push-device-plugin :
32- docker build --platform linux/riscv64 -f Dockerfile -t $(REGISTRY ) /$(IMAGE ) :device-plugin-latest .
33- docker push $(REGISTRY ) /$(IMAGE ) :device-plugin-latest
34+ docker build --platform linux/riscv64 -f Dockerfile -t $(REGISTRY ) /$(IMAGE ) :device-plugin-$( TAG ) .
35+ docker push $(REGISTRY ) /$(IMAGE ) :device-plugin-$( TAG )
3436
3537.PHONY : container-push-node-labeller
3638container-push-node-labeller :
37- docker build --platform linux/riscv64 -f labeller.Dockerfile -t $(REGISTRY ) /$(IMAGE ) :node-labeller-latest .
38- docker push $(REGISTRY ) /$(IMAGE ) :node-labeller-latest
39+ docker build --platform linux/riscv64 -f labeller.Dockerfile -t $(REGISTRY ) /$(IMAGE ) :node-labeller-$( TAG ) .
40+ docker push $(REGISTRY ) /$(IMAGE ) :node-labeller-$( TAG )
3941
4042.PHONY : kubectl-apply
4143kubectl-apply : kubectl-apply-device-plugin kubectl-apply-node-labeller
4244
4345.PHONY : kubectl-apply-device-plugin
4446kubectl-apply-device-plugin :
45- kubectl apply -f k8s-ds-device-plugin.yaml
47+ test -n $(TAG ) || echo " TAG must be defined"
48+ cat k8s-ds-device-plugin.yaml | env TAG=" $( TAG) " envsubst | kubectl apply -f -
4649 kubectl rollout restart daemonset/rise-riscv-runner-device-plugin -n kube-system
4750
4851.PHONY : kubectl-apply-and-wait-device-plugin
@@ -51,7 +54,8 @@ kubectl-apply-and-wait-device-plugin: kubectl-apply-device-plugin
5154
5255.PHONY : kubectl-apply-node-labeller
5356kubectl-apply-node-labeller :
54- kubectl apply -f k8s-ds-node-labeller.yaml
57+ test -n $(TAG ) || echo " TAG must be defined"
58+ cat k8s-ds-node-labeller.yaml | env TAG=" $( TAG) " envsubst | kubectl apply -f -
5559 kubectl rollout restart daemonset/rise-riscv-runner-node-labeller -n kube-system
5660
5761.PHONY : clean
0 commit comments