Shell

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
case "${BRANCH_NAME}" in
cicd-test)
    export DEPLOY_ENV="测试环境"
    ;;
cicd-beta)
    export DEPLOY_ENV="灰度环境"
    ;;
cicd-prod)
    export DEPLOY_ENV="生产环境"
    ;;
master)
    export DEPLOY_ENV="上个稳定版本"
    ;;
*)
    export DEPLOY_ENV="未知"
esac
jo msgtype=markdown "markdown[content]=${msg}"

【小菜笔记】系列文章首发于公众号【小菜学编程】,敬请关注: