从S3到Windows Server的AWS Code Deploy EC2/本地yml文件错误 [英] AWS Code Deploy EC2/On-premises yml file error on from s3 to windows server
问题描述
自2天以来,我一直在苦苦挣扎,但我找不到正确的答案,而且在Google中,我无法解决错误.
i am struggling since 2 days, but i can not find proper answer, and also in google there are no refrence that i can solve error.
- 我在aws代码部署中创建了部署,在awscodeeployrole中具有附加角色,
- 从应用程序创建zip
- 创建如下的Appspec.yml文件
version: 0.0
os: windows
files:
- source: AdvertApiPublish.zip
destination: C:\inetpub\wwwroot
我上传了包含appspec文件的zip文件,并进行了部署,但出现以下错误
i uploaded zip file including appspec file, and do deployment i got following error
部署失败,因为在应用程序规范文件中输入了无效的版本值(0.0).确保您的AppSpec文件指定"0.0"作为版本,然后重试.
The deployment failed because an invalid version value (0.0) was entered in the application specification file. Make sure your AppSpec file specifies "0.0" as the version, and then try again.
在Google上,我发现了这个stackoverflow问题 AWS CodeDeploy ymal文件错误
on google i found this stackoverflow question AWS CodeDeploy ymal file error
我也尝试更改编码,但是没有运气. 我不知道我在想什么
i tried to change encoding also but no luck. i dont know what i am missing
推荐答案
我可以使用安装在vs2019社区版中的以下编码来解决安装事件之前的问题
i could solve before install event issue, using below encoding in vs2019 community edition
但是在安装事件之后,出现以下错误 没有这样的文件或目录@ rb_sysopen ... AdvertApiPublish.zip
but then after in install event i got following error No such file or directory @ rb_sysopen ... AdvertApiPublish.zip
我知道那里是个愚蠢的错误,我不必在yaml文件中设置zip文件,而必须在其中提供已发布的应用程序目录. 所以我如下更改了yaml文件
that i knew it was sily error there, i dont have to set zip file in yaml file , i have to give published application directory inside it. so i changed yaml file as below
version: 0.0
os: windows
files:
- source: **PublishAdvertApi**
destination: C:\inetpub\wwwroot
我的部署成功了!!收款人
AND MY DEPLOYMENT WAS SUCCEEDED!! HURREEEE
这篇关于从S3到Windows Server的AWS Code Deploy EC2/本地yml文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!