I'm attempting to use bitbucket code pipelines to deploy to elastic beanstalk, using the eb cli.
Here's my bitbucket-pipelines.yml
file, I've based it on the amazonlinux image, as this is what's running on the VM's in production.
image: amazonlinux
pipelines:
branches:
testing:
- step:
name: Build & Deploy
script:
- curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
- yum -y install nodejs zip gcc-c++ make
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- pip install awsebcli
- npm install
- export AWS_ACCESS_KEY_ID="$TEST_AWS_ACCESS_KEY_ID"
- export AWS_DEFAULT_REGION="$TEST_AWS_DEFAULT_REGION"
- export AWS_SECRET_ACCESS_KEY="$TEST_AWS_SECRET_ACCESS_KEY"
- echo "deploying to $TEST_BEANSTALK_ENVIRONMENT_NAME"
- eb --version
- eb deploy $TEST_BEANSTALK_ENVIRONMENT_NAME
Installation seems to run fine, down to the eb --version
line. However the eb deploy ...
command return an incredibly useful error
ERROR: OSError ::
Does anyone have any suggestions as to what I could do differently to resolve this?
Edit - I get the same result running this from an ubuntu image too -
image: ubuntu:16.04
pipelines:
branches:
testing:
- step:
name: Build & Deploy
script:
- apt-get update && apt-get install -y software-properties-common
- add-apt-repository universe
- apt-get update && apt-get -y upgrade && apt-get install -y python-pip curl build-essential libssl-dev
- curl -sL https://deb.nodesource.com/setup_8.x | bash
- apt-get install nodejs
- pip install awsebcli
- node -v
- npm -v
- npm install
- export AWS_ACCESS_KEY_ID="$TEST_AWS_ACCESS_KEY_ID"
- export AWS_DEFAULT_REGION="$TEST_AWS_DEFAULT_REGION"
- export AWS_SECRET_ACCESS_KEY="$TEST_AWS_SECRET_ACCESS_KEY"
- echo "deploying to $TEST_BEANSTALK_ENVIRONMENT_NAME"
- eb --version
- eb deploy $TEST_BEANSTALK_ENVIRONMENT_NAME
Also gives me ERROR: OSError ::