Skip to main content

Setting a new staging for your team.

Checkout a new branch for this staging

git checkout -b stagingX

Request leader to upgrade Project to Blaze plan (contact Thomas)

Create Firestore DB

Create authentication

Create Firebase Storage

Init your Firebase Storage service from the Firebase Console

Create your Shopify app

  • Distribution public
  • Update Protected Data setting
  • Setup Shopify configuration with app URL, callback URL

Update gitlab.yaml file

Copy the Gitlab script for the new staging, replace the matching variable echoed from the Gitlab CI

Add value to Gitlab CI/CD

Add our app credentials from Firebase to CI/CD

Update .firebaserc

Add you new project to .firebaserc. Remember to update your gitlab.yaml deploy command with firebase use match this staging alias.

firebase use --add

Update firebase functions config

You can copy the functions config from other staging using firebase functions:config:get and then set the value to notepad, sublime text. And then use this helper to form a new functions:config:set command.

Object.keys(config).map(masterKey => {
const childKeys = Object.keys(config[masterKey]);
return childKeys.map(keyItem => `${masterKey}.${keyItem}="${config[masterKey][keyItem]}"`)
}).flat().join(" ")

Deploy extensions

Deploy extensions manually using Shopify CLI. Remember to change the production CDN URL to your staging URL.

Create app engine

Go to: https://console.cloud.google.com/appengine/start?project=PROJECT_ID and hit create.

Update Service Account Token Creator role for app engine

Enable IAM Service Account Credentials API

Copy Big Query table if needed

You can copy Big Query dataset and tables across your projects easily.