Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions 10/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,27 @@ fi
if [ "$NODE_ENV" != "production" ]; then

echo "---> Building your Node application from source"

# We will be using npm CI by default for more information please refer to
# https://github.com/sclorg/s2i-nodejs-container/issues/212
echo "---> Installing dependencies with npm ci"
npm ci || \
# npm ci will fail if certain conditions aren't met as mentioned in
# https://docs.npmjs.com/cli-commands/ci.html#description
echo "---> npm ci failed, installing dependencies with npm install"; \
npm install

else

echo "---> Installing all dependencies"

# We will be using npm CI by default for more information please refer to
# https://github.com/sclorg/s2i-nodejs-container/issues/212
echo "---> Installing dependencies with npm ci"
NODE_ENV=development npm ci || \
# npm ci will fail if certain conditions aren't met as mentioned in
# https://docs.npmjs.com/cli-commands/ci.html#description
echo "---> npm ci failed, installing dependencies with npm install"; \
NODE_ENV=development npm install

#do not fail when there is no build script
Expand Down
17 changes: 16 additions & 1 deletion 12/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,26 @@ fi
if [ "$NODE_ENV" != "production" ]; then

echo "---> Building your Node application from source"
npm install

# We will be using npm CI by default for more information please refer to
# https://github.com/sclorg/s2i-nodejs-container/issues/212
echo "---> Installing dependencies with npm ci"
npm ci || \
# npm ci will fail if certain conditions aren't met as mentioned in
# https://docs.npmjs.com/cli-commands/ci.html#description
echo "---> npm ci failed, installing dependencies with npm install"; \
npm install
else

echo "---> Installing all dependencies"

# We will be using npm CI by default for more information please refer to
# https://github.com/sclorg/s2i-nodejs-container/issues/212
echo "---> Installing dependencies with npm ci"
NODE_ENV=development npm ci || \
# npm ci will fail if certain conditions aren't met as mentioned in
# https://docs.npmjs.com/cli-commands/ci.html#description
echo "---> npm ci failed, installing dependencies with npm install"; \
NODE_ENV=development npm install

#do not fail when there is no build script
Expand Down