ElasticBeanstalk using a script - path to web application package

terrencebenade's Avatar

terrencebenade

26 Feb, 2015 03:59 AM

Hi,

For the life of me I cannot see how I can get the path of the web application package as a result of :-
publish_wap: true

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.

Thanks
Terry

  1. Support Staff 1 Posted by Feodor Fitsner on 26 Feb, 2015 04:10 AM

    Feodor Fitsner's Avatar

    Hi Terry,

    I'm not sure if it's documented, but there is $artifacts hash table being put into PowerShell context after all artifacts uploaded. You can iterate it with:

    foreach($artifactName in $artifacts.keys) {
      $artifacts[$artifactName]
    }
    
  2. 2 Posted by terrencebenade on 26 Feb, 2015 04:58 AM

    terrencebenade's Avatar

    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.

    on_success:
      - ps: >-
          
          if($true)
          {
            Write-Host "Success"
            foreach($artifactName in $artifacts.keys) {
              $artifacts[$artifactName]
            }
          }
    

    dies in the parser

  3. Support Staff 3 Posted by Feodor Fitsner on 26 Feb, 2015 05:06 AM

    Feodor Fitsner's Avatar

    Use "reverse engineering" :) i.e. Export YAML:

    deploy_script:
    - ps: >-
        foreach($artifactName in $artifacts.keys) {
          $artifacts[$artifactName]
        }
    
  4. 4 Posted by terrencebenade on 26 Feb, 2015 07:01 AM

    terrencebenade's Avatar

    worked a treat thank you.

  5. terrencebenade closed this discussion on 26 Feb, 2015 07:01 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac