tag:help.appveyor.com,2012-11-13:/discussions/questions/1045-elasticbeanstalk-using-a-script-path-to-web-application-packageAppVeyor: Discussion 2018-10-19T08:17:03Ztag:help.appveyor.com,2012-11-13:Comment/361433752015-02-26T03:59:11Z2015-02-26T03:59:12ZElasticBeanstalk using a script - path to web application package<div><p>Hi,</p>
<p>For the life of me I cannot see how I can get the path of the
web application package as a result of :-<br>
publish_wap: true</p>
<p>Given I have to use a custom build script to deploy via
awsdeploy.exe I am assuming I cant use artifacts. So any guidance
on how I can get the path of the package so I can can pass it to
the awsdeploy configuration script would be much appreciated.</p>
<p>Thanks<br>
Terry</p></div>terrencebenadetag:help.appveyor.com,2012-11-13:Comment/361433752015-02-26T04:10:39Z2015-02-26T04:10:39ZElasticBeanstalk using a script - path to web application package<div><p>Hi Terry,</p>
<p>I'm not sure if it's documented, but there is
<code>$artifacts</code> hash table being put into PowerShell
context after all artifacts uploaded. You can iterate it with:</p>
<pre>
<code>foreach($artifactName in $artifacts.keys) {
$artifacts[$artifactName]
}</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/361433752015-02-26T04:58:36Z2015-02-26T04:58:36ZElasticBeanstalk using a script - path to web application package<div><p>Hey Feodor, thanks for the crazy fast response! Any chance you
can show me a working example in appveyor.yml. I cant get any to
work.</p>
<pre>
<code>on_success:
- ps: >-
if($true)
{
Write-Host "Success"
foreach($artifactName in $artifacts.keys) {
$artifacts[$artifactName]
}
}</code>
</pre>
<p>dies in the parser</p></div>terrencebenadetag:help.appveyor.com,2012-11-13:Comment/361433752015-02-26T05:06:21Z2015-02-26T05:06:21ZElasticBeanstalk using a script - path to web application package<div><p>Use "reverse engineering" :) i.e. Export YAML:</p>
<pre>
<code>deploy_script:
- ps: >-
foreach($artifactName in $artifacts.keys) {
$artifacts[$artifactName]
}</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/361433752015-02-26T07:01:09Z2015-02-26T07:01:09ZElasticBeanstalk using a script - path to web application package<div><p>worked a treat thank you.</p></div>terrencebenade