Deploy apps

Registration work#

  1. Prepare a Github account for Deploy
  2. Tell Hexabase your Github account
  3. (Add Github account to Hexabase repository)
  4. Create a sub-repository for Front-end applications
  5. Inform Hexabase of the sub-repository and delivery URL
  6. (Hexabase registers sub repository and delivery URL in DNS)

Deploy to Staging Environment:#

  1. Developer pushes to github 'develop' branch
  2. Github sends webhook to Jenkins
  3. Jenkins builds Docker image, uploads k8s manifests to GCS and pushes Docker image to GCR
  4. Google Pub/Sub listens on any changes in GCR and sends message to Spinnaker
  5. Automated trigger gets invoked in Spinnaker Staging Pipeline
  6. Spinnaker gets artifacts from GCS and GCR and deploys to Staging Environment

Deploy to Production Environment:#

  1. Developer pushes to github 'master' branch
  2. Automated trigger gets invoked in Spinnaker production pipeline
  3. Spinnaker references artifact from last execution of Spinnaker Staging Pipeline
  4. Spinnaker gets artifacts from GCS and GCR and deploys to Production Environment

Note#

Do not use process.env when developing front-end applications. It can be a problem when deploying your application. If you want to switch the execution environment of the front-end application, use something other than process.env. For example, for Nuxt.js you can use nuxt.config.js.