Skip to content

Commit

Permalink
Refactor Node executors for reusing environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Jorquera committed May 10, 2020
1 parent 697fa51 commit 26c1b42
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
14 changes: 14 additions & 0 deletions common/orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ cache-key-npm: &cache-key-npm
cache-key-sonar: &cache-key-sonar
key: cache-sonar-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_BRANCH }}-{{ checksum "sonar-project.properties" }}

node-options: &node-options
NODE_OPTIONS: --max_old_space_size=6144

orbs:
aws-cli: circleci/[email protected]

Expand All @@ -21,6 +24,17 @@ executors:
default: '14.2'
docker:
- image: cimg/node:<< parameters.node-version >>
environment:
<< : *node-options
node-browsers:
parameters:
node-version:
type: string
default: '14'
docker:
- image: circleci/node:<< parameters.node-version >>-browsers
environment:
<< : *node-options
java:
docker:
- image: cimg/openjdk:11.0-node
Expand Down
7 changes: 3 additions & 4 deletions ionic/orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ jobs:
description: Deprecated
type: string
default: 'deprecated'
docker:
- image: circleci/node:<< parameters.node-version >>-browsers
executor:
name: common/node-browsers
node-version: << parameters.node-version >>
steps:
- run:
name: Checking deprecated parameters
Expand Down Expand Up @@ -122,8 +123,6 @@ jobs:
description: Deprecated
type: string
default: 'deprecated'
environment:
NODE_OPTIONS: --max_old_space_size=6144
executor:
name: common/node
node-version: << parameters.node-version >>
Expand Down

0 comments on commit 26c1b42

Please sign in to comment.