awslabs / aws-codedeploy-plugin

Jenkins plugin for AWS CodeDeploy
Apache License 2.0
153 stars 131 forks source link

Job doesn't find appspec file #74

Closed delpinoconsulting closed 6 years ago

delpinoconsulting commented 7 years ago

I'm trying to build and deploy on a Jenkins node, and as long as the appspec has no "Per Deployment" configuration, the job completes (i.e., regular appspec.yml)

If I choose the option of "Appspec.yml per Deployment Group", the job never completes with the following error:

Failed CodeDeploy post-build step; exception follows.
/appspec.staging.yml file does not exist
java.lang.IllegalArgumentException: /appspec.staging.yml file does not exist
    at com.amazonaws.codedeploy.AWSCodeDeployPublisher.zipAndUpload(AWSCodeDeployPublisher.java:349)
    at com.amazonaws.codedeploy.AWSCodeDeployPublisher.perform(AWSCodeDeployPublisher.java:230)
    at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:682)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627)
    at hudson.model.Run.execute(Run.java:1749)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:419)
Build step 'Deploy an application to AWS CodeDeploy' marked build as failure
Finished: FAILURE

I've tried using a custom Workspace, and even copying the file to the remote FS root to no avail.

Any help on how to successfully build and deploy from a node would be greatly appreciated.

Jmcfar commented 6 years ago

Merging this with https://github.com/awslabs/aws-codedeploy-plugin/issues/63 as they appear to be overlapping issues.