Home > OS >  Pre-provided parameters to command with required prompt in SHELL
Pre-provided parameters to command with required prompt in SHELL

Time:06-24

So I have to make deployment of AWS Elastic Beanstalk application with AWSEB CLI on Jenkins. When i try to use command

eb init

It requires some information and credentials. Credentials are stored as parameters or could be a secret file on Jenkins instance. Command have no such things like --parameter to provide it at start. Is there any solution to provide all parameters in the code that in runtime this command will now okay now this is provided now this and so on? Something like this:

eb init --username XXX --password XXX --others XXX

Here is documentation for that command https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html

CodePudding user response:

Will this answer help your issue? It seems you can set some of the parameters as Environment variables and rest as flags.. For example.

$ export AWS_ACCESS_KEY_ID="xxx"
$ export AWS_SECRET_ACCESS_KEY="xxx"
$ export AWS_DEFAULT_REGION="xxx"

Then

eb init --region eu-west-1 --platform <platform-name> appname
  • Related