1 Star 0 Fork 20

liulian0515/jenkins-sample

forked from hanxianchao/jenkins-sample 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rollout.sh 697 Bytes
一键复制 编辑 原始数据 按行查看 历史
hanxianchao 提交于 2024-11-18 14:24 . update rollout.sh.
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: $0 <action> <deployment> [namespace]"
echo "Actions: undo, history"
exit 1
fi
ACTION=$1
DEPLOYMENT=$2
NAMESPACE=${3:-default}
case $ACTION in
undo)
echo "Rolling back deployment $DEPLOYMENT in namespace $NAMESPACE..."
kubectl rollout undo deployment "$DEPLOYMENT" -n "$NAMESPACE"
;;
history)
echo "Showing rollout history for deployment $DEPLOYMENT in namespace $NAMESPACE..."
kubectl rollout history deployment "$DEPLOYMENT" -n "$NAMESPACE"
;;
*)
echo "Invalid action: $ACTION"
exit 1
;;
esac
echo "Operation completed."
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/liulian0515/jenkins-sample.git
git@gitee.com:liulian0515/jenkins-sample.git
liulian0515
jenkins-sample
jenkins-sample
master

搜索帮助