My build process packages my application in a
.nupkg instead of a
Assuming my .nupkg contains a correctly-implemented
appspec.yml and is otherwise appropriately bundled, can my deployment revision use it?
DevOps Stack Exchange is a question and answer site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure. It only takes a minute to sign up.Sign up to join this community
Yes. AWS CodeDeploy bundletype is specified separately from the revision location, so you could upload a .nupkg to Amazon S3, set the bundle type to 'zip', and since a nupkg is simply an archive CodeDeploy will treat it as such and upload it to your EC2 instance.
In your nuspec, make sure your appspec.yml gets placed in the root of your .nupkg. My project contains the appspec.yml and powershell scripts to manage windows services in a directory structure like this:
deploy/appspec.yml deploy/lib/get.ps1 deploy/lib/start.ps1 deploy/lib/stop.ps1 ...
You can include this structure at the root by simply recursively retrieving this directory structure (via double wildcards
**) in the nuspec files element:
<files> <file src="deploy\**" target="" /> </files>
And then after packing and outputting the nupkg, you can create the application revision as below: