From 2f9c3ee7aaad963e352eca6be420f6c403a512f2 Mon Sep 17 00:00:00 2001 From: Yousif Ahmed Date: Wed, 31 Jan 2024 09:47:54 +0000 Subject: [PATCH] Update npm auth config for node 18 --- docker-compose.yml | 2 ++ .../Dockerfile.react-native-android-builder-java-17-node-18 | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0b02752c83..0e2090e7d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -156,6 +156,7 @@ services: dockerfile: dockerfiles/Dockerfile.react-native-android-builder-java-17-node-18 args: - REGISTRY_URL + - REGISTRY_URI - REG_BASIC_CREDENTIAL - REG_NPM_EMAIL - MAVEN_REPO_URL @@ -164,6 +165,7 @@ services: - BRANCH_NAME - BUILDKITE - REGISTRY_URL + - REGISTRY_URI - REACT_NATIVE_VERSION - RN_NEW_ARCH - NOTIFIER_VERSION diff --git a/dockerfiles/Dockerfile.react-native-android-builder-java-17-node-18 b/dockerfiles/Dockerfile.react-native-android-builder-java-17-node-18 index a3c531a715..e5a5f06d31 100644 --- a/dockerfiles/Dockerfile.react-native-android-builder-java-17-node-18 +++ b/dockerfiles/Dockerfile.react-native-android-builder-java-17-node-18 @@ -11,9 +11,11 @@ WORKDIR /app RUN rm -f ~/.npmrc ARG REG_BASIC_CREDENTIAL ARG REG_NPM_EMAIL -RUN echo "_auth=$REG_BASIC_CREDENTIAL" >> ~/.npmrc +ARG REGISTRY_URL +ARG REGISTRY_URI +RUN echo "registry=$REGISTRY_URL" >> ~/.npmrc +RUN echo "$REGISTRY_URI:_auth=$REG_BASIC_CREDENTIAL" >> ~/.npmrc RUN echo "email=$REG_NPM_EMAIL" >> ~/.npmrc -RUN echo "always-auth=true" >> ~/.npmrc # gradle / artifactory auth ARG MAVEN_REPO_URL