Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

WIP for embedded assets #8

Open
wants to merge 7 commits into
base: fronity-env-vars
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 19 additions & 7 deletions .circleci/config.yml
Expand Up @@ -5,17 +5,30 @@ workflows:
jobs:
- pantheon/push
- playground/npmbuild_and_persist:
package_lock_location: "frontity"
path_to_persist: "frontity/build"
build_command: "npm run build"
package_lock_location: "embed-files-in-node-server"
path_to_persist: "embed-files-in-node-server/build"
build_command: "npm run build-for-gcp"
requires:
- pantheon/push
pre-steps:
- playground/setbashenv
- run:
name: set up embed
command: |
git clone git@github.com:stevector/embed-files-in-node-server.git
cd embed-files-in-node-server
git checkout build-for-gcp
rm -r frontity
cd ..
cp -r frontity embed-files-in-node-server/frontity
cd embed-files-in-node-server/frontity
npm ci
cd ..
npm ci
cat webpack.config.js
- deploy_cloud_function:
requires:
- playground/npmbuild_and_persist

jobs:
deploy_cloud_function:
docker:
Expand All @@ -26,7 +39,7 @@ jobs:
at: .
- playground/setbashenv
- run: ls -al
- run: cd frontity/build && ls -al
- run: cd embed-files-in-node-server/build && ls -al
- run:
name: Login to gcloud
command: |
Expand All @@ -37,8 +50,7 @@ jobs:
name: deploy
# @todo make a variable for serverlessplayground and runtime, and probably everything in gcloud functions deploy.
command: |
gcloud functions deploy ${TERMINUS_SITE}--${TERMINUS_ENV} --project=serverlessplayground --runtime=nodejs10 --trigger-http --allow-unauthenticated --entry-point=default --source=frontity/build --set-env-vars="TERMINUS_SITE=${TERMINUS_SITE},TERMINUS_ENV=${TERMINUS_ENV}"

gcloud functions deploy ${TERMINUS_SITE}--${TERMINUS_ENV} --project=serverlessplayground --runtime=nodejs10 --trigger-http --allow-unauthenticated --entry-point=default --source=embed-files-in-node-server/build --set-env-vars="TERMINUS_SITE=${TERMINUS_SITE},TERMINUS_ENV=${TERMINUS_ENV}"
orbs:
pantheon: pantheon-systems/pantheon@0.2.0
playground: fauxalgore/playground@0.0.2