3

My build process packages my application in a .nupkg instead of a .zip.

Assuming my .nupkg contains a correctly-implemented appspec.yml and is otherwise appropriately bundled, can my deployment revision use it?

2

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:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.