Search code examples
amazon-elastic-beanstalkebcli

EB CLI parameterize deployment artifact name for CI deploys


Using EB CLI to deploy a prebuilt application package. The related config.yml section looks like this:

deploy:
  artifact: Website.zip

The CI build however creates a file that has the version added to it:

Website-1.5.44.zip

Is there any option to specify the deployment artifact via command like, something like this:

eb deploy --artifact "Website-1.5.44.zip"
#or
eb deploy --artifact "/path/to/Website-1.5.44.zip"

Are there any alternatives that EB CLI provides to deploy versioned build artifacts in CI pipelines? I could probably renamed the versioned zip file to just Website.zip and then run eb deploy but it would be nice to have the version be present in the artifact filename also.


Solution

  • Currently there is no way to do what you are describing; there are no flags to direct the EB CLI to take from a custom artifact. For now you will have to name the artifact to whatever is in your config.yml

    The comment that you added will save the artifact Website.zip and name the application version Website-1.5.44.zip. It will not deploy the artifact named Website-1.5.44.zip