aws-codedeploy-agent icon indicating copy to clipboard operation
aws-codedeploy-agent copied to clipboard

Appspec.yml - support deployment specification params

Open ejhayes opened this issue 9 years ago • 15 comments

It looks like it is possible to use deployment specification values in hook scripts https://blogs.aws.amazon.com/application-management/post/Tx1PX2XMPLYPULD/Using-CodeDeploy-Environment-Variables

However, I noticed that it wasn't possible to use these values in the appspec.yml file. This PR adds support for that. To use the deployment specification values in the appspec.yml you can simply do this:

version: 0.0
os: linux
files:
  - source: someDir
    destination: /var/www/<%= application_name %>
hooks:
  ValidateService:
    - location: scripts/validate_app
      timeout: 15
      runas: root

The following values are supported:

  • application_name
  • deployment_id
  • deployment_group_name
  • deployment_group_dir
  • deployment_root_dir
  • last_successful_deployment_dir

ejhayes avatar Jun 21 '16 09:06 ejhayes

Coverage Status

Coverage increased (+0.03%) to 94.591% when pulling 299d66fc71e9f2fd1789914db1beb5471e957334 on ejhayes:master into 41e3296e5de77b7b3b61844b00996a0bea7f68ad on aws:master.

coveralls avatar Jun 21 '16 09:06 coveralls

will this feature be available soon as it's petty cool

obayesshelton avatar Jul 19 '17 11:07 obayesshelton

Coverage Status

Coverage decreased (-0.1%) to 91.882% when pulling 6aa99fd970bf40477e54148e9e89c8bdbbae6254 on ejhayes:master into 81ffec26b1a394e5c951bc2e8a8ba3e731e81148 on aws:master.

coveralls avatar Jul 19 '17 16:07 coveralls

@ejhayes i have just tried this and it doesnt work. Is this supposed to be live yet?

jreason avatar Sep 09 '17 08:09 jreason

Any idea when this might be available?

praymaker avatar Dec 08 '17 15:12 praymaker

@praymaker the PR right now is failing will have to fix test before i accept this @ejhayes

rohkat-aws avatar Jun 22 '18 17:06 rohkat-aws

Hi can we see this feature live soon? or is there any fix that needs to be done, we are willing to chip in!

wickstargazer avatar Jun 28 '18 07:06 wickstargazer

@wickstargazer I was taking a look at this a couple days ago and was having trouble getting it to pass the tests. The appspec yaml file is getting parsed as a ERB, but the tests are failing because my update passing the deployment spec params to the parsing function. Want to take a look to see if you can get it to pass?

ejhayes avatar Jun 28 '18 18:06 ejhayes

3 years later, still not merged :( In gitlab-ci.yml they use this syntax:

files:
  - source: someDir
    destination: /var/www/${APPLICATION_NAME}

MickL avatar May 14 '20 19:05 MickL

+1

nelg avatar Feb 23 '21 00:02 nelg

any updates on this

dayyehm avatar Sep 09 '21 13:09 dayyehm

any updates ?

roushanDevops avatar Nov 29 '22 14:11 roushanDevops

Any update?

robsonexecutiva avatar Dec 30 '22 15:12 robsonexecutiva

Any update?

aurora-cain avatar Feb 08 '23 18:02 aurora-cain

Ping.. any developers looking at this? Cheers

hashbangperl avatar Jun 23 '23 13:06 hashbangperl