Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appspec.yml - support deployment specification params #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ejhayes
Copy link

@ejhayes ejhayes commented Jun 21, 2016

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

@coveralls
Copy link

Coverage Status

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

@obayesshelton
Copy link

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

@coveralls
Copy link

coveralls commented Jul 19, 2017

Coverage Status

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

@jreason
Copy link

jreason commented Sep 9, 2017

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

@praymaker
Copy link

Any idea when this might be available?

@rohkat-aws
Copy link
Contributor

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

@wickstargazer
Copy link

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

@ejhayes
Copy link
Author

ejhayes commented Jun 28, 2018

@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?

@MickL
Copy link

MickL commented May 14, 2020

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

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

@nelg
Copy link

nelg commented Feb 23, 2021

+1

@dayyehm
Copy link

dayyehm commented Sep 9, 2021

any updates on this

@roushanDevops
Copy link

any updates ?

@robsonexecutiva
Copy link

Any update?

1 similar comment
@aurora-cain
Copy link

Any update?

@hashbangperl
Copy link

Ping.. any developers looking at this? Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.