Skip to content

Commit

Permalink
Use one deploy script for both PWS and PCF
Browse files Browse the repository at this point in the history
- Update the package.sh script to use this one script
- PCF's deploy.sh used to build the front end, but that's not
  the spirit of the release package
- Update PCF/config/config.js to use correct websocket port (4443)
  • Loading branch information
Kehrlann committed Jul 22, 2018
1 parent 594458c commit 82c7f36
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 29 deletions.
8 changes: 5 additions & 3 deletions deployment/pws/deploy.sh → deployment/deploy.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ set -e

# The directory in which this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ASSETS_DIR="$SCRIPT_DIR"/assets
CONFIG_DIR="$SCRIPT_DIR"/config

cf push -f config/manifest-api.yml -p "$SCRIPT_DIR"/assets/api
cf push -f "$CONFIG_DIR"/manifest-api.yml -p "$ASSETS_DIR"/api
cf run-task {{api-app-name}} '[email protected] ADMIN_PASSWORD=password rake admin:create_user'

cp config/config.js "$SCRIPT_DIR"/assets/web
cf push -f config/manifest-web.yml -p "$SCRIPT_DIR"/assets/web
cp "$CONFIG_DIR"/config.js "$ASSETS_DIR"/web
cf push -f "$CONFIG_DIR"/manifest-web.yml -p "$ASSETS_DIR"/web
2 changes: 1 addition & 1 deletion deployment/pcf/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ window.Retro = {
"stylesheets": ["application.css"],
"useRevManifest": true,
"api_base_url": "https://{{api-app-name}}.{{pcf-url}}",
"websocket_url": "wss://{{api-app-name}}.{{pcf-url}}:443/cable",
"websocket_url": "wss://{{api-app-name}}.{{pcf-url}}:4443/cable",
"contact": "",
"terms": "",
"privacy": ""
Expand Down
14 changes: 0 additions & 14 deletions deployment/pcf/deploy.sh

This file was deleted.

5 changes: 5 additions & 0 deletions humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ Contact: [email protected]
Product Designer: Zarrin Rahman
Contact: [email protected]

/* PIVOTAL PARIS */

Engineer: Daniel Garnier-Moiroux
Contact: [email protected]

/* CONTRIBUTORS */

Engineer: Andrew Leung
Expand Down
24 changes: 13 additions & 11 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,35 @@ set -e

mkdir package

# BUILD FRONT-END

pushd web
NODE_ENV=production gulp assets
gulp package
popd

# PWS

cp -r deployment/pws package
cp -r deployment/deploy.sh package/pws/deploy.sh
chmod u+x package/pws/deploy.sh

mkdir package/pws/assets

cp -r api package/pws/assets/api

pushd web
NODE_ENV=production gulp assets
gulp package
popd
cp -r web/package package/pws/assets/web

# PCF

cp -r deployment/pcf package
cp -r deployment/deploy.sh package/pcf/deploy.sh
chmod u+x package/pcf/deploy.sh

mkdir package/pcf/assets

cp -r api package/pcf/assets/api

pushd web
NODE_ENV=production gulp assets
gulp package
popd
cp -r web/package package/pcf/assets/web


# Docs

cp deployment/INSTRUCTIONS.md package
Expand Down

0 comments on commit 82c7f36

Please sign in to comment.