HomePhabricator

Define `NODE_ENV` and always define `NODE_PATH`

Description

Define NODE_ENV and always define NODE_PATH

Summary:
Define NODE_ENV based on the configuration and define NODE_PATH when
either npm.install or npm.env are true. The latter behavior is
necessary for final stages of multi-stage builds where npm modules are
not installed but the application requires node-related environment
variables to run.

Depends on D757
Ref T174626

Rename npm module/config to node

Renamed npm yaml entry to node and NpmConfig to NodeConfig.
Since we're dealing with general node builds and configuration, this
seems to make more sense.

Test Plan:
Run go test ./... or arc unit. Run blubber against at least the
blubber.example.yaml.

Reviewers: thcipriani, mobrovac, mmodell, Release-Engineering-Team

Reviewed By: thcipriani, Release-Engineering-Team

Tags: Release-Engineering-Team

Maniphest Tasks: T174626

Differential Revision: https://phabricator.wikimedia.org/D759