您能帮我解决错误吗?谢谢!
log:[“ SLS apps.deployment-in-app中的必需声明安装应用程序未形成为单个密钥字典”,“ sls apps.deployment-in-app中的必需声明下载安装程序未形成为单个密钥字典“]}]
public static long[] CumulativeSums(long[] values)
{
if (values == null || values.Length == 0) return new long[0];
var results = new long[values.Length];
results[0] = values[0];
for (var i = 1; i < values.Length; i++)
{
results[i] = results[i - 1] + values[i];
}
return results;
}
答案 0 :(得分:0)
我认为您缺少的是您的需求中的“ cmd:”。
我会尝试:
stop-application-if-exists:
cmd.run:
- name: cd /opt/TEST/{{pillar['instance-id']}}/Application/tomcat/bin && ./shutdown.sh && process_id=$(ps -aef|grep catalina|grep -v grep|grep "/opt/TEST/{{pillar['instance-id']}}/Application/tomcat/"|awk '{print $2}') && if [ ! -z "$process_id" ];then echo "$process_id"|xargs kill -9;fi
- cwd: /opt/TEST/
- unless: "[ ! -e /opt/TEST/{{pillar['instance-id']}}/Application/tomcat/bin/shutdown.sh ]"
- runas: {{pillar['user']}}
download-installer:
cmd.run:
- name: " mkdir -p /u01/Release/build_{{ pillar['id'] }} && wget {{ pillar['zipurl'] }} -P /u01/Release/build_{{ pillar['id'] }} && unzip -q /u01/Release/build_{{ pillar['id'] }}/*.zip -d /u01/Release/build_{{ pillar['id'] }} && wget {{ pillar['xmlurl'] }} -P /u01/Release/build_{{ pillar['id'] }}/{{ pillar['release-ver'] }} "
- runas: {{pillar['user']}}
install-application:
cmd.run:
- name: "java -DHFShowAllPanels=true -jar test-installer-2.0.jar auto-deploy.xml"
- cwd: /u01/Release/build_{{ pillar['id'] }}/{{ pillar['release-ver'] }}
- require:
- cmd: download-installer
- runas: {{pillar['user']}}
start-application:
cmd.run:
- name: "./startup.sh"
- cwd: /opt/TEST/{{pillar['instance-id']}}/Application/tomcat/bin
- require:
- cmd: install-application
- runas: {{pillar['user']}}