Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Move staging to CF staging environment
Browse files Browse the repository at this point in the history
  • Loading branch information
James C. Scott committed Sep 6, 2017
1 parent 2365dd4 commit 9111069
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Code Climate](https://codeclimate.com/github/18F/cg-dashboard/badges/gpa.svg)](https://codeclimate.com/github/18F/cg-dashboard)

Environments: [Production](https://dashboard.fr.cloud.gov)
[Staging](https://dashboard-staging.app.cloud.gov)
[Staging](https://dashboard.fr-stage.cloud.gov)
[Testing Server](https://dashboard-testing-server.app.cloud.gov)


Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Currently, the site does not have visual regression testing so must be manually
tested for breaking visual changes. Here is a simple script to assist in manual
testing. Generally, it's best to look through all the pages and check if
anything looks off. Testing should generally be done on the staging environment,
[dashboard-staging.apps.cloud.gov](https://dashboard-staging.apps.cloud.gov/),
[dashboard.fr-stage.cloud.gov](https://dashboard.fr-stage.cloud.gov/),
when all the necessary code is on the master branch and has been deployed. To
check that the master branch has been deployed, check [Circle
CI](https://circleci.com/gh/18F/cg-dashboard).
Expand Down
1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ machine:
environment:
GODIST: "go1.8.linux-amd64.tar.gz"
WS: "/home/ubuntu/.go_workspace/src/github.com/18F/cg-dashboard"
CF_API: "https://api.fr.cloud.gov"
CF_ORGANIZATION: "cloud-gov"
post:
- cd cg-dashboard && nvm install && nvm use && nvm alias default $(cat .nvmrc)
Expand Down
30 changes: 8 additions & 22 deletions deploy/circle_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,30 @@ cf install-plugin -f /home/ubuntu/.go_workspace/bin/autopilot
# Only the organization, api, deployer account password differ.


CF_APP="cg-dashboard"
CF_SPACE="dashboard"

if [[ "$CIRCLE_TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]
then
CF_MANIFEST="manifest-prod.yml"
CF_SPACE="dashboard-prod"
CF_APP="cg-dashboard"
CF_API="https://api.fr.cloud.gov"
CF_USERNAME=$CF_USERNAME_PROD_SPACE
CF_PASSWORD=$CF_PASSWORD_PROD_SPACE
elif [ "$CIRCLE_BRANCH" == "master" ]
then
CF_MANIFEST="manifest-staging.yml"
CF_SPACE="dashboard-stage"
CF_APP="cg-dashboard-staging"
CF_API="https://api.fr-stage.cloud.gov"
CF_USERNAME=$CF_USERNAME_STAGE_SPACE
CF_PASSWORD=$CF_PASSWORD_STAGE_SPACE
elif [ "$CIRCLE_BRANCH" == "demo" ]
then
CF_MANIFEST="manifest-demo.yml"
CF_SPACE="dashboard-stage"
CF_APP="cg-dashboard-demo"
else
echo Unknown environment, quitting. >&2
exit 1
fi

# We use the deployer-account broker to get the credentials of
# our deployer accounts.
# Currently, the deployer accounts are scoped to a single space.
# As a result, we will filter by space for which credentials to use.
if [ "$CF_SPACE" == "dashboard-prod" ]
then
CF_USERNAME=$CF_USERNAME_PROD_SPACE
CF_PASSWORD=$CF_PASSWORD_PROD_SPACE
elif [ "$CF_SPACE" == "dashboard-stage" ]
then
CF_USERNAME=$CF_USERNAME_STAGE_SPACE
CF_PASSWORD=$CF_PASSWORD_STAGE_SPACE
else
echo "Unknown space. Do not know how to deploy $CF_SPACE."
exit 1
fi

echo manifest: $CF_MANIFEST
echo space: $CF_SPACE

Expand Down
5 changes: 0 additions & 5 deletions manifests/manifest-base.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
---
buildpack: go_buildpack
memory: 256M
domain: app.cloud.gov
services:
- dashboard-ups
- dashboard-redis
env:
CONSOLE_LOGIN_URL: https://login.fr.cloud.gov/
CONSOLE_UAA_URL: https://uaa.fr.cloud.gov/
CONSOLE_API_URL: https://api.fr.cloud.gov/
CONSOLE_LOG_URL: https://loggregator.fr.cloud.gov/
SECURE_COOKIES: true
GA_TRACKING_ID: UA-48605964-34
GOVERSION: go1.8
Expand Down
4 changes: 4 additions & 0 deletions manifests/manifest-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ applications:
CONSOLE_HOSTNAME: https://dashboard.fr.cloud.gov
NEW_RELIC_ID: "20390582"
NEW_RELIC_BROWSER_LICENSE_KEY: "5d4bc714a6"
CONSOLE_LOGIN_URL: https://login.fr.cloud.gov/
CONSOLE_UAA_URL: https://uaa.fr.cloud.gov/
CONSOLE_API_URL: https://api.fr.cloud.gov/
CONSOLE_LOG_URL: https://loggregator.fr.cloud.gov/
12 changes: 9 additions & 3 deletions manifests/manifest-staging.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
inherit: manifest-base.yml
domain: fr-stage.cloud.gov
applications:
- name: cg-dashboard-staging
host: dashboard-staging
- name: cg-dashboard
host: dashboard
instances: 3
env:
CONSOLE_HOSTNAME: https://dashboard-staging.app.cloud.gov
CONSOLE_HOSTNAME: https://dashboard.fr-stage.cloud.gov
CONSOLE_LOGIN_URL: https://login.fr-stage.cloud.gov/
CONSOLE_UAA_URL: https://uaa.fr-stage.cloud.gov/
CONSOLE_API_URL: https://api.fr-stage.cloud.gov/
CONSOLE_LOG_URL: https://loggregator.fr-stage.cloud.gov/

0 comments on commit 9111069

Please sign in to comment.