在运行电源外壳纸条詹金斯内部版本号在电源外壳脚本
curl -X POST --data-urlencode 'payload={"channel": "#personal", "username": "Jenkins", "text": "Building $env:BUILD_NUMBER", "icon_emoji": ":computer:"}' https://xxxxxx.slack.com/services/hooks/incoming-webhook?token=aseaUO
或
curl -X POST --data-urlencode 'payload={"channel": "#personal-notification", "username": "Jenkins", "text": "Building ${BUILD_NUMBER}", "icon_emoji": ":computer:"}' https://xxxxxx.slack.com/services/hooks/incoming-webhook?token=aseaUO
的{BUILD_NUMBER}是没有得到通过实际版本号的卷曲有效载荷替换
- 编辑 我注意到我的sh脚本正在调用git \ bin \ sh.exe。那是问题吗?
尝试下面的其中一条评论 curl -X POST --data-urlencode $('payload = {0}“channel”:“#personal”,“username”:“Jenkins”,“text”: “建设{1}”, “icon_emoji”: “:计算机:”{2}” -f “{”,$ ENV:罗汉) “}” https://xxxxxx.slack.com/services/hooks/incoming-webhook?token=aseaUO我得到
直接尝试运行PS终端上的脚本,我得到
Buildnumber在全球环境变量'ENV定义:'或'psvariable变量:'?试试这个:'$ {env:BUILD_NUMBER}' – 2014-09-27 13:23:23
不行不行 – 2014-09-27 13:55:10