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

Commit

Permalink
NO_PROXY variable for npm (#199)
Browse files Browse the repository at this point in the history
* Update assemble

* Update README.md
  • Loading branch information
crmarques authored and helio-frota committed Jul 4, 2019
1 parent aeb2862 commit 20872c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -83,6 +83,7 @@ NPM_MIRROR | Sets the npm registry URL
NODE_ENV | Node.js runtime mode (default: "production")
HTTP_PROXY | use an npm proxy during assembly
HTTPS_PROXY | use an npm proxy during assembly
NO_PROXY | set URLs that should be excluded from proxying during assembly

One way to define a set of environment variables is to include them as key value pairs
in a `.s2i/environment` file in your source repository.
Expand Down
10 changes: 10 additions & 0 deletions s2i/assemble
Expand Up @@ -31,6 +31,16 @@ if [ ! -z $https_proxy ]; then
npm config set https-proxy $https_proxy
fi

if [ ! -z $NO_PROXY ]; then
echo "---> Setting npm no proxy config to $NO_PROXY"
npm config set no-proxy $NO_PROXY
fi

if [ ! -z $no_proxy ]; then
echo "---> Setting npm no proxy config to $no_proxy"
npm config set no-proxy $no_proxy
fi

# Change the npm registry mirror if provided
if [ ! -z "$NPM_MIRROR" ]; then
echo "---> Setting the npm package mirror to $NPM_MIRROR"
Expand Down

0 comments on commit 20872c2

Please sign in to comment.