-
Notifications
You must be signed in to change notification settings - Fork 1
Deploy Instructions
Note, for 211Ride, we are currently deploying from the 211Ride
branch since they are behind the other clients.
Instructions correspond to deploy/CLIENTNAME/CLIENTNAME-ENV.sh script.
- Configure AWS profile if not done previously. See devops for AWS credentials.
aws configure --profile ieuw
- Navigate to your local repo.
cd oneclick-ionic-ui
-
Checkout and update
develop
branch. -
Upload any translation key migration json files to the target OCC server. These files are found in
deploy/i18n-migrations
. All files since the last deployment to your target should be uploaded. They are uploaded on the admin console translations page. Use the JSON import feature for 'EN' at the bottom of the page. Once the new keys are imported, run the auto-translate function on the page for each of the new keys. Check the migration file to get the name in order to find it easily. -
Update localization json files from target OCC server database. Languages are client-specific. Navigate to the client's deploy folder at
deploy/CLIENTNAME
Run./_locale-CLIENTNAME-ENV.sh
. Use the script for the environment to which you are deploying.
Here are some examples of the lines in that script for reference:
cd src/assets/i18n/
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=en&format=json" -o en.json
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=es&format=json" -o es.json
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=pt&format=json" -o pt.json
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=vi&format=json" -o vi.json
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=ht&format=json" -o ht.json
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=zh&format=json" -o zh.json
curl "http://occ-ieuw-qa.herokuapp.com/api/v1/translations/all?lang=fa&format=json" -o fa.json
cd ../../..
- Navigate to the client's deploy folder at
deploy/CLIENTNAME
and then run the qa or dev deploy script:
./CLIENTNAME-ENV.sh
This script will automatically deploy to S3 as described here:
DO NOT RUN (included in script) aws s3 sync ../../www/ s3://ui-ieuw-qa --acl public-read --cache-control no-cache --profile ieuw
- Clear CloudFront on AWS.
- Click on CloudFront service (can access via the Services menu)
- Click on ID for the correct qa domain. If CloudFront does not list one, then you are finished as CloudFront is not used for this deployment.
- Click on Invalidations tab
- Click on Create invalidation button
- Type: /* in the object path box and then click on Create invalidation.
- Wait for the invalidation to complete or you may inadvertently cancel it.
- Navigate to qa or dev site (for 211Ride, site) and smoke test.
- Plan a trip.
- Check that back-end API calls are being made in Network tab.
Instructions correspond to deploy/CLIENTNAME/CLIENTNAME-prod.sh script.
- Configure AWS profile if not done previously. See devops for AWS credentials.
aws configure --profile ieuw
- Navigate to your local repo.
cd oneclick-ionic-ui
-
Checkout and update the
release/X.X.X
branch you are deploying. -
Upload any translation key migration json files to the target OCC server. These files are found in
deploy/i18n-migrations
. All files since the last deployment to your target should be uploaded. They are uploaded on the admin console translations page. Use the JSON import feature for 'EN' at the bottom of the page. Once the new keys are imported, run the auto-translate function on the page for each of the new keys. Check the migration file to get the name in order to find it easily. -
Update localization json files from Production database. Languages are client-specific. Navigate to the client's deploy folder at
deploy/CLIENTNAME
Run./_locale-CLIENTNAME-prod.sh
-
Merge
release/X.X.X
branch intomaster
branch -
Tag
master
branch with the X.X.X release number. The best way to do this is to create a new release on GitHub and then create a new master branch tag as part of that. You can enter release notes there as well. -
Merge
master
back intodevelop
(this step will not be necessary if no commits were made directly to the release branch) -
Navigate to the client's deploy folder (for example
deploy/211ride
) and then run the prod deploy script:
./211ride-prod.sh
This script will automatically deploy to S3 as described here:
DO NOT RUN (included in script) aws s3 cp --recursive ../../www/ s3://www.211ride.org --acl public-read --cache-control no-cache --profile ieuw
- Clear CloudFront on AWS.
- Click on CloudFront service (can access via the Services menu)
- Click on ID for the correct production domain. If CloudFront does not list one, then you are finished as CloudFront is not used for this client.
- Click on Invalidations tab
- Click on Create invalidation button
- Type: /* in the object path box and then click on Create invalidation.
- Wait for the invalidation to complete or you may inadvertently cancel it.
- Navigate to production site (for 211Ride, site) and smoke test.