i have this scenario. i would like to deploy codes based on branches and i have 2 branches the master and development. i have the following configuration:
---------------------------------------------------------------
image: python:3.5.1
pipelines:
branches:
master:
- step:
script:
- apt-get update # required to install zip
- apt-get install -y zip # required for packaging up the application
- pip install boto3==1.3.0 # required for codedeploy_deploy.py
- zip -r /tmp/artifact.zip * # package up the application for deployment
- python codedeploy_deploy.py "DEPLOYMENT_GROUP_NAME = 'stable',APPLICATION_NAME = 'production'"
development:
- step:
script:
- apt-get install -y zip # required for packaging up the application
- pip install boto3==1.3.0 # required for codedeploy_deploy.py
- zip -r /tmp/artifact.zip * # package up the application for deployment
- python codedeploy_deploy.py "DEPLOYMENT_GROUP_NAME = 'testing',APPLICATION_NAME = 'development'"
--------------------------------------------------------------------------
i use python to do the deployment through codedeploy and s3 on aws servers and i have two deployment groups with autoscale for production and development
so the only diffrent thing is where the deployment will happen on which group and i feeded the variables to the python script. so my question is there any better way to do this using the enviroment variables on pipelines?