Skip to content

Commit 7cc196c

Browse files
authored
NPM. Private packages (#501)
* NPM_TOKEN * A check for dev mode
1 parent ba31aa8 commit 7cc196c

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

bin/sdk/assets/baked.sh

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ function Assets::build() {
101101
--build-arg "SPRYKER_PIPELINE=${SPRYKER_PIPELINE}" \
102102
--build-arg "SPRYKER_BUILD_HASH=${SPRYKER_BUILD_HASH:-"current"}" \
103103
--build-arg "SPRYKER_BUILD_STAMP=${SPRYKER_BUILD_STAMP:-""}" \
104+
--build-arg "SPRYKER_NPM_TOKEN=${SPRYKER_NPM_TOKEN:-""}" \
104105
. 1>&2
105106

106107
Console::end "[DONE]"

bin/sdk/images/common.sh

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ function Images::_buildApp() {
126126
--build-arg "SPRYKER_PIPELINE=${SPRYKER_PIPELINE}" \
127127
--build-arg "SPRYKER_BUILD_HASH=${SPRYKER_BUILD_HASH:-"current"}" \
128128
--build-arg "SPRYKER_BUILD_STAMP=${SPRYKER_BUILD_STAMP:-""}" \
129+
--build-arg "SPRYKER_NPM_TOKEN=${SPRYKER_NPM_TOKEN:-""}" \
129130
. 1>&2
130131

131132
if [ -n "${SPRYKER_XDEBUG_MODE_ENABLE}" ]; then

images/baked/assets/Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ COPY --chown=spryker:spryker package.json package-lock.json ${srcRoot}/
99
COPY --chown=spryker:spryker frontend* ${srcRoot}/frontend
1010
COPY --chown=spryker:spryker tsconfig*.json ${srcRoot}/
1111
COPY --chown=spryker:spryker config/Yves ${srcRoot}/config/Yves
12+
COPY --chown=spryker:spryker .npmrc ${srcRoot}/
13+
14+
ARG SPRYKER_NPM_TOKEN
15+
ENV SPRYKER_NPM_TOKEN=${SPRYKER_NPM_TOKEN}
16+
17+
RUN if [ -n "$SPRYKER_NPM_TOKEN" ]; then \
18+
sed -i "s|\${SPRYKER_NPM_TOKEN}|${SPRYKER_NPM_TOKEN}|" .npmrc; \
19+
fi
1220

1321
ARG SPRYKER_ASSETS_MODE='development'
1422
ENV SPRYKER_ASSETS_MODE=${SPRYKER_ASSETS_MODE}

images/mount/cli/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ FROM ${SPRYKER_PARENT_IMAGE} as cli-development
55

66
ENV DEVELOPMENT_CONSOLE_COMMANDS=1
77

8+
ARG SPRYKER_NPM_TOKEN
9+
ENV SPRYKER_NPM_TOKEN=${SPRYKER_NPM_TOKEN}
10+

0 commit comments

Comments
 (0)