Skip to content

Commit aa65bcf

Browse files
committed
Revert "Always use the dotnet-public-npm feed"
This reverts commit c628649.
1 parent c628649 commit aa65bcf

14 files changed

Lines changed: 48 additions & 60 deletions

File tree

eng/pipelines/steps/pip-authenticate.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ steps:
1616
# rather than appending a duplicate --build-arg.
1717
$options = "$(imageBuilderBuildArgs)"
1818
$options = $options -replace '--build-arg PIP_INDEX_URL=\S+', "--build-arg PIP_INDEX_URL=$env:PIP_INDEX_URL"
19-
# The npm registry (public dotnet-public-npm feed) is baked into the Dockerfiles as the
20-
# NPM_REGISTRY default and is read anonymously, so no override is needed here. Internal
21-
# builds additionally pass a token so they can ingest new package versions; the token is
22-
# optional and unused on anonymous reads.
19+
# Dockerfiles default NPM_REGISTRY to the Microsoft public npm proxy (for public/local
20+
# builds). On internal builds, point npm at the authenticated dotnet-public-npm feed and
21+
# provide the token so the auth key derived from the URL resolves. Keeping the internal
22+
# feed URL here means it lives in exactly one place instead of every Dockerfile.
23+
$options += " --build-arg NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/"
2324
$options += " --build-arg NPM_TOKEN=$(System.AccessToken)"
2425
echo "##vso[task.setvariable variable=imageBuilderBuildArgs]$options"
2526
displayName: Set PIP and NPM Build Args

src/azurelinux/3.0/net10.0/webassembly/amd64/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ RUN tdnf update -y \
1212
libxml2 \
1313
unzip
1414

15-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
16-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
17-
# only needed by internal builds that ingest new package versions into the feed.
18-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
15+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
16+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
17+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
1918
ARG NPM_TOKEN
2019

2120
RUN npm config set registry "$NPM_REGISTRY" && \

src/azurelinux/3.0/net8.0/webassembly/amd64/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ RUN tdnf update -y \
1313
# dependency for npm package modification
1414
jq
1515

16-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
17-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
18-
# only needed by internal builds that ingest new package versions into the feed.
19-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
16+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
17+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
18+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
2019
ARG NPM_TOKEN
2120

2221
RUN npm config set registry "$NPM_REGISTRY" && \

src/azurelinux/3.0/net9.0/webassembly/amd64/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ RUN tdnf update -y \
1212
libxml2 \
1313
unzip
1414

15-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
16-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
17-
# only needed by internal builds that ingest new package versions into the feed.
18-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
15+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
16+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
17+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
1918
ARG NPM_TOKEN
2019

2120
RUN npm config set registry "$NPM_REGISTRY" && \

src/azurelinux/3.0/renovate/amd64/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ RUN tdnf update -y && \
1717
util-linux \
1818
&& tdnf clean all
1919

20-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
21-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
22-
# only needed by internal builds that ingest new package versions into the feed.
23-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
20+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
21+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
22+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
2423
ARG NPM_TOKEN
2524

2625
RUN npm config set registry "$NPM_REGISTRY" && \

src/ubuntu/22.04/amd64/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@ RUN ARCH=$(dpkg --print-architecture) \
9696
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
9797
&& rm -f /tmp/powershell.tar.gz
9898

99-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
100-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
101-
# only needed by internal builds that ingest new package versions into the feed.
102-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
99+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
100+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
101+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
103102
ARG NPM_TOKEN
104103

105104
# Install Node 20 from NodeSource and use the patched npm ip module.
106-
# npm registry comes from NPM_REGISTRY (default feed above); NPM_TOKEN only adds ingestion auth for internal builds.
105+
# npm registry comes from NPM_REGISTRY (default proxy above); NPM_TOKEN adds auth for the internal feed.
107106
RUN cd /etc/apt/sources.list.d && \
108107
rm -f nodesource.list && \
109108
cd ~ && \

src/ubuntu/22.04/coredeps/amd64/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ RUN apt-get update \
3535
uuid-dev \
3636
&& rm -rf /var/lib/apt/lists/*
3737

38-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
39-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
40-
# only needed by internal builds that ingest new package versions into the feed.
41-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
38+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
39+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
40+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
4241
ARG NPM_TOKEN
4342

4443
# Install Node 20 from NodeSource and use the patched npm ip module.
45-
# npm registry comes from NPM_REGISTRY (default feed above); NPM_TOKEN only adds ingestion auth for internal builds.
44+
# npm registry comes from NPM_REGISTRY (default proxy above); NPM_TOKEN adds auth for the internal feed.
4645
RUN cd /etc/apt/sources.list.d && \
4746
rm -f nodesource.list && \
4847
cd ~ && \

src/ubuntu/22.04/helix/webassembly/amd64/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ RUN locale-gen en_US.UTF-8
4040
COPY ./setup-node-23.x.sh /tmp
4141
RUN /tmp/setup-node-23.x.sh && apt-get -y install nodejs
4242

43-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
44-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
45-
# only needed by internal builds that ingest new package versions into the feed.
46-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
43+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
44+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
45+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
4746
ARG NPM_TOKEN
4847

4948
RUN npm config set registry "$NPM_REGISTRY" && \

src/ubuntu/24.04/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,13 @@ RUN ARCH=$(dpkg --print-architecture) \
9595
&& ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \
9696
&& rm -f /tmp/powershell.tar.gz
9797

98-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
99-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
100-
# only needed by internal builds that ingest new package versions into the feed.
101-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
98+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
99+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
100+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
102101
ARG NPM_TOKEN
103102

104103
# Install node 20 and use its bundled npm so we don't pull in distro npm dependencies unnecessarily.
105-
# npm registry comes from NPM_REGISTRY (default feed above); NPM_TOKEN only adds ingestion auth for internal builds.
104+
# npm registry comes from NPM_REGISTRY (default proxy above); NPM_TOKEN adds auth for the internal feed.
106105
RUN rm -f /etc/apt/sources.list.d/nodesource.list && \
107106
cd ~ && \
108107
curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh && \

src/ubuntu/24.04/helix/webassembly/amd64/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ RUN chmod +x /tmp/setup-node-23.x.sh \
4545
&& apt-get install -y nodejs \
4646
&& rm -rf /var/lib/apt/lists/*
4747

48-
# npm registry. Defaults to the public dotnet-public-npm Azure Artifacts feed, which is
49-
# readable anonymously (works for local/dev and public builds). NPM_TOKEN is optional and
50-
# only needed by internal builds that ingest new package versions into the feed.
51-
ARG NPM_REGISTRY=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/
48+
# Registry npm installs pull from; defaults to the Microsoft public npm proxy.
49+
# Internal builds override NPM_REGISTRY with the dotnet-public-npm Azure Artifacts feed and set NPM_TOKEN.
50+
ARG NPM_REGISTRY=https://packagefeedproxy.microsoft.io/npm/
5251
ARG NPM_TOKEN
5352

5453
RUN npm config set registry "$NPM_REGISTRY" && \

0 commit comments

Comments
 (0)