Skip to content

Commit

Permalink
taking stab at adding development server to circle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanh committed Jun 27, 2017
1 parent 0c1f86a commit 80797c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ stages:
CODECOV_TOKEN: "ebdd735e-579a-4afd-85fc-f53907544c31"
DEVOPS_REPO: "git@github.com:ParabolInc/action-devops.git"
DEVOPS_WORKDIR: "/home/ubuntu/action-devops"
GITHUB_REMOTE_DEVELOPMENT: "dokku@action-dev-nyc1-01.parabol.co:web"
GITHUB_REMOTE_PRODUCTION: "dokku@action-production.parabol.co:web"
GITHUB_REMOTE_STAGING: "dokku@action-staging.parabol.co:web"
PRODUCTION_BACKUP_VOLUME: "/mnt/volume-nyc1-01/action-production"
Expand All @@ -31,6 +32,8 @@ stages:
curl --ssl -X POST -H 'Content-type: application/json' --data '{"text":"Starting CI and Deployment..."}' $SLACK_PROD_URL
elif [ "${CIRCLE_BRANCH}" == "staging" ]; then
curl --ssl -X POST -H 'Content-type: application/json' --data '{"text":"Starting CI and Deployment..."}' $SLACK_STAGING_URL
elif [ "${CIRCLE_BRANCH}" == "development" ]; then
curl --ssl -X POST -H 'Content-type: application/json' --data '{"text":"Starting CI and Deployment..."}' $SLACK_DEV_URL
fi
- type: checkout
Expand Down Expand Up @@ -70,6 +73,8 @@ stages:
export DEPLOY_ENV="production"
elif [ "${CIRCLE_BRANCH}" == "staging" ]; then
export DEPLOY_ENV="staging"
elif [ "${CIRCLE_BRANCH}" == "development" ]; then
export DEPLOY_ENV="development-server"
else
export DEPLOY_ENV="development"
fi
Expand All @@ -91,6 +96,8 @@ stages:
export GITHUB_REMOTE="${GITHUB_REMOTE_PRODUCTION}"
elif [ "${CIRCLE_BRANCH}" == "staging" ]; then
export GITHUB_REMOTE="${GITHUB_REMOTE_STAGING}"
elif [ "${CIRCLE_BRANCH}" == "development" ]; then
export GITHUB_REMOTE="${GITHUB_REMOTE_DEVELOPMENT}"
fi
if [ -n "${GITHUB_REMOTE}" ]; then
npm run build:deploy &&
Expand All @@ -110,6 +117,8 @@ stages:
export GITHUB_REMOTE="${GITHUB_REMOTE_PRODUCTION}"
elif [ "${CIRCLE_BRANCH}" == "staging" ]; then
export GITHUB_REMOTE="${GITHUB_REMOTE_STAGING}"
elif [ "${CIRCLE_BRANCH}" == "development" ]; then
export GITHUB_REMOTE="${GITHUB_REMOTE_DEVELOPMENT}"
fi
if [ -n "${GITHUB_REMOTE}" ]; then
git remote add dokku $GITHUB_REMOTE
Expand Down

0 comments on commit 80797c4

Please sign in to comment.