ci: use rm -f to avoid errors when cleaning up temporary files
The -f flag prevents errors if the files do not exist, ensuring the cleanup step is robust and does not fail the deployment process.
This commit is contained in:
4
Makefile
4
Makefile
@@ -27,8 +27,8 @@ deploy-server:
|
|||||||
@cat k8s/deployment.yaml >> /tmp/server_deploy.yaml
|
@cat k8s/deployment.yaml >> /tmp/server_deploy.yaml
|
||||||
@# Single SCP/SSH call to reduce password prompts
|
@# Single SCP/SSH call to reduce password prompts
|
||||||
scp /tmp/server_deploy.yaml $(SERVER_USER)@$(SERVER_IP):/tmp/server_deploy.yaml
|
scp /tmp/server_deploy.yaml $(SERVER_USER)@$(SERVER_IP):/tmp/server_deploy.yaml
|
||||||
ssh $(SERVER_USER)@$(SERVER_IP) "sudo kubectl apply -f /tmp/server_deploy.yaml && rm /tmp/server_deploy.yaml"
|
ssh $(SERVER_USER)@$(SERVER_IP) "sudo kubectl apply -f /tmp/server_deploy.yaml && rm -f /tmp/server_deploy.yaml"
|
||||||
@rm /tmp/server_deploy.yaml
|
@rm -f /tmp/server_deploy.yaml
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
-podman kube down k8s/deployment.yaml >/dev/null 2>&1
|
-podman kube down k8s/deployment.yaml >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user