Unverified Commit 9b625db7 by Joseph Mulloy Committed by GitHub

Merge pull request #4242 from edx/jdmulloy/baked_config_sandbox

Update baked_config.sh to support sandbox
parents e7f6769c 42a0e910
...@@ -10,7 +10,13 @@ ENVIRONMENT="$(echo $1 | cut -d - -f 1 )" ...@@ -10,7 +10,13 @@ ENVIRONMENT="$(echo $1 | cut -d - -f 1 )"
DEPLOY="$(echo $1 | cut -d - -f 2 )" DEPLOY="$(echo $1 | cut -d - -f 2 )"
E_D="${ENVIRONMENT}-${DEPLOY}" E_D="${ENVIRONMENT}-${DEPLOY}"
if [ ! -e $WORKSPACE/${DEPLOY}-internal/ansible/vars/${DEPLOY}.yml ]; then VARS="-e@$WORKSPACE/${DEPLOY}-internal/ansible/vars/${DEPLOY}.yml -e@$WORKSPACE/${DEPLOY}-internal/ansible/vars/${E_D}.yml -e@$WORKSPACE/${DEPLOY}-secure/ansible/vars/${DEPLOY}.yml -e@$WORKSPACE/${DEPLOY}-secure/ansible/vars/${E_D}.yml"
if [ "${E_D}" == "developer-sandbox" ]; then
VARS="-e@$WORKSPACE/${DEPLOY}-internal/ansible/vars/${E_D}.yml -e@$WORKSPACE/${DEPLOY}-secure/ansible/vars/${E_D}.yml"
fi
if [ ! -e "$WORKSPACE/${DEPLOY}-internal/ansible/vars/${E_D}.yml" ]; then
echo "Please specify a valid environment-deployment (i.e. stage-edx) as the first and only argument" echo "Please specify a valid environment-deployment (i.e. stage-edx) as the first and only argument"
exit 1 exit 1
fi fi
...@@ -18,4 +24,4 @@ fi ...@@ -18,4 +24,4 @@ fi
mkdir -p $WORKSPACE/baked-config-secure/${E_D} mkdir -p $WORKSPACE/baked-config-secure/${E_D}
cd ../playbooks/edx-east/ cd ../playbooks/edx-east/
ansible-playbook -vvv -c local -i 'localhost,' --tags edxapp_cfg ./edxapp.yml -e@$WORKSPACE/${DEPLOY}-internal/ansible/vars/${DEPLOY}.yml -e@$WORKSPACE/${DEPLOY}-internal/ansible/vars/${E_D}.yml -e@$WORKSPACE/${DEPLOY}-secure/ansible/vars/${DEPLOY}.yml -e@$WORKSPACE/${DEPLOY}-secure/ansible/vars/${E_D}.yml -e edxapp_user=$(whoami) -e common_web_group=$(whoami) -e edxapp_app_dir=$WORKSPACE/baked-config-secure/${E_D} -e edxapp_code_dir=$WORKSPACE/edx-platform -e EDXAPP_CFG_DIR=$WORKSPACE/baked-config-secure/${E_D} -s --ask-sudo-pass --diff ansible-playbook -vvv -c local -i 'localhost,' --tags edxapp_cfg ./edxapp.yml ${VARS} -e edxapp_user=$(whoami) -e common_web_group=$(whoami) -e edxapp_app_dir=$WORKSPACE/baked-config-secure/${E_D} -e edxapp_code_dir=$WORKSPACE/edx-platform -e EDXAPP_CFG_DIR=$WORKSPACE/baked-config-secure/${E_D} -s --ask-sudo-pass --diff
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment